本文整理汇总了PHP中connector类的典型用法代码示例。如果您正苦于以下问题:PHP connector类的具体用法?PHP connector怎么用?PHP connector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了connector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TrackBook
public function TrackBook()
{
$connector = new connector();
$sql = "";
$sql .= " SELECT";
$sql .= " ReferenceNo";
$sql .= " , DelSender";
$sql .= " , DelReceiver";
$sql .= " , Status";
$sql .= " , Reason";
$sql .= " , ServiceLevel";
$sql .= " , DeliveryBoxSize";
$sql .= " , WaybillNumber";
$sql .= " , LBC ";
$sql .= " FROM booking_details ";
$sql .= " WHERE";
$sql .= " ReferenceNo \t= '" . $this->referenceNo . "' OR ";
$sql .= " WaybillNumber \t= '" . $this->referenceNo . "' OR ";
$sql .= " LBC \t\t\t= '" . $this->referenceNo . "'";
$mysqliQuery = mysqli_query($connector->GetConnection(), $sql);
$counter = 0;
$trackBookOutput = new TrackBookOutput();
$row = mysqli_fetch_array($mysqliQuery);
$trackBookOutput->onlineReferenceNo = $row["ReferenceNo"];
$trackBookOutput->waybillNo = $row["WaybillNumber"];
$trackBookOutput->provincialTrackingNo = $row["LBC"];
$trackBookOutput->sender = $row["DelSender"];
$trackBookOutput->receiver = $row["DelReceiver"];
$trackBookOutput->latestStatus = $row["Status"];
$trackBookOutput->reason = $row["Reason"];
$trackBookOutput->serviceLevel = $row["ServiceLevel"];
$trackBookOutput->size = $row["DeliveryBoxSize"];
return $trackBookOutput;
}
示例2: artevod
function artevod($connector_path = "")
{
parent::connector($connector_path);
$xml = file_get_contents($connector_path . "/profil.xml");
$this->profile = _parser_text_no_function_($xml, "ARTEVODCONFIG");
$this->set_default_enrichment_template();
}
示例3: loadPagesAndDocs
/**
* Load all pages and docs.
*
* @param string $start page/doc to start with for the return
* @param int $pageLength page length (leave null to use default)
*
* @return void
*/
protected function loadPagesAndDocs($start, $pageLength)
{
// Set default page length if necessary
if ($pageLength == null) {
$pageLength = $this->connector->getPageLength();
}
// Get data on all pages and docs
foreach ($this->queue as $parent => $items) {
$this->outline['counts'][$parent] = count($items);
if (count($items) < $start) {
continue;
}
$this->outline['lists'][$parent] = [];
for ($i = $start; $i < $start + $pageLength; $i++) {
if ($i >= count($items)) {
break;
}
$id = $items[$i];
// If there's a cache of this page...
$item = $this->getCache(md5($id), $this->moddate[$parent]);
if (!$item) {
$item = $this->buildItem($id);
$this->setCache(md5($id), $item);
}
$this->outline['lists'][$parent][$i] = $item;
}
}
}
示例4: onclasssave
function onclasssave()
{
parent::start_template();
$inputclass = $this->fun->accept('inputclass', 'P');
$integra = $this->fun->accept('integra', 'P');
$integra = empty($integra) ? 0 : $integra;
$rankname = $this->fun->accept('rankname', 'P');
$isinter = $this->fun->accept('isinter', 'P');
$db_table = db_prefix . 'member_class';
$date = time();
if ($inputclass == 'add') {
$db_field = 'rankname,isinter,integra,isclass,lockin';
$db_values = "'{$rankname}',{$isinter},{$integra},0,0";
$this->db->query('INSERT INTO ' . $db_table . ' (' . $db_field . ') VALUES (' . $db_values . ')');
$this->writelog($this->lng['memclassmanage_add_log'], $this->lng['log_extra_ok'] . ' rankname=' . $rankname);
$this->dbcache->clearcache('memberclass_array', true);
exit('true');
} elseif ($inputclass == 'edit') {
$mcid = $this->fun->accept('mcid', 'P');
$db_where = 'mcid=' . $mcid;
$db_set = "rankname='{$rankname}',isinter={$isinter},integra={$integra}";
$this->db->query('UPDATE ' . $db_table . ' SET ' . $db_set . ' WHERE ' . $db_where);
$this->writelog($this->lng['memclassmanage_edit_log'], $this->lng['log_extra_ok'] . ' subjectname=' . $typename . ' sid=' . $sid);
$this->dbcache->clearcache('memberclass_array', true);
$this->dbcache->clearcache('memberclass_view_' . $mcid, true);
exit('true');
}
}
示例5: header
function in_index()
{
parent::start_pagetemplate();
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
if ($this->CON['is_html']) {
$lng_dir = $this->get_lng_dirpack(admin_LNG);
if ($this->CON['is_alonelng']) {
$index_file = admin_ROOT . $this->CON['file_htmldir'] . $this->CON['entrance_file'] . '.' . $this->CON['file_fileex'];
$urlfile = admin_URL . $this->CON['file_htmldir'];
$strfile = $this->CON['file_htmldir'] . $this->CON['entrance_file'] . '.' . $this->CON['file_fileex'];
} else {
$index_file = admin_ROOT . $this->CON['file_htmldir'] . $lng_dir . '/' . $this->CON['entrance_file'] . '.' . $this->CON['file_fileex'];
$urlfile = admin_URL . $this->CON['file_htmldir'] . $lng_dir . '/';
$strfile = $this->CON['file_htmldir'] . $lng_dir . '/' . $this->CON['entrance_file'] . '.' . $this->CON['file_fileex'];
}
if (is_file($index_file)) {
header("HTTP/1.1 301 Moved Permanently");
header('location: ' . $urlfile);
exit;
} else {
header('Content-type: text/html; charset=utf-8');
exit('错误:HTML静态网页不存在,请登陆后台进行静态页面生成!<br>Filename : ' . $strfile . '<br><a href="' . admin_URL . adminfile . '">点陆登陆管理平台!</a>');
}
}
$this->pagetemplate->assign('id', 5);
$this->pagetemplate->assign('mlink', $this->mlink);
$this->pagetemplate->assign('path', 'index');
$this->pagetemplate->display(admin_LNGDIR . 'index', 'index', false, null, admin_LNG);
}
示例6:
function lib_menu()
{
$this->softbase(true);
parent::start_template();
$this->ectemplates->caching = false;
$this->ectemplates->libfile = true;
}
示例7: onsmssendedit
function onsmssendedit()
{
parent::start_template();
$tab = $this->fun->accept('tab', 'R');
$tab = empty($tab) ? 'true' : $tab;
$type = $this->fun->accept('type', 'R');
$type = empty($type) ? 'edit' : $type;
$smsid = intval($this->fun->accept('smsid', 'R'));
if (empty($smsid)) {
exit('false');
}
$db_table = db_prefix . 'smssendlist';
$db_where = 'smsid=' . $smsid;
$read = $this->db->fetch_first('SELECT * FROM ' . $db_table . ' WHERE ' . $db_where);
$typearray = $this->get_moblie_type_array($read['mobtid']);
$this->ectemplates->assign('typelist', $typearray['list']);
$this->ectemplates->assign('read', $read);
$this->ectemplates->assign('path', admin_URL);
$this->ectemplates->assign('type', $type);
$this->ectemplates->assign('tab', $tab);
if ($type == 'edit') {
$this->ectemplates->display('mobliemain/sms_send_edit');
} elseif ($type == 'send') {
$moblielist_array = explode(',', $read['moblielist']);
$sendhow = count($moblielist_array);
$this->ectemplates->assign('sendhow', $sendhow);
$this->ectemplates->display('mobliemain/sms_send_away');
}
}
示例8: onrecomsave
function onrecomsave()
{
parent::start_template();
$inputclass = $this->fun->accept('inputclass', 'P');
$mid = $this->fun->accept('mid', 'P');
$mid = empty($mid) ? 0 : $mid;
$lng = $this->fun->accept('lng', 'P');
$lng = empty($lng) ? $this->sitelng : $lng;
$labelname = $this->fun->accept('labelname', 'P');
$db_table = db_prefix . 'document_label';
$date = time();
if ($inputclass == 'add') {
$db_field = 'lng,mid,labelname';
$db_values = "'{$lng}',{$mid},'{$labelname}'";
$this->db->query('INSERT INTO ' . $db_table . ' (' . $db_field . ') VALUES (' . $db_values . ')');
$this->writelog($this->lng['recommanage_add_log'], $this->lng['log_extra_ok'] . ' labelname=' . $labelname);
$this->dbcache->clearcache('doclabel_array_' . $mid, true);
$this->dbcache->clearcache('doclabel_array_0', true);
exit('true');
} elseif ($inputclass == 'edit') {
$dlid = $this->fun->accept('dlid', 'P');
$db_where = 'dlid=' . $dlid;
$db_set = "labelname='{$labelname}'";
$this->db->query('UPDATE ' . $db_table . ' SET ' . $db_set . ' WHERE ' . $db_where);
$this->writelog($this->lng['recommanage_edit_log'], $this->lng['log_extra_ok'] . ' labelname=' . $labelname . ' dlid=' . $dlid);
$this->dbcache->clearcache('doclabel_array_' . $mid, true);
$this->dbcache->clearcache('doclabel_array_0', true);
exit('true');
}
}
示例9: onsave
function onsave()
{
parent::start_template();
$inputclass = $this->fun->accept('inputclass', 'P');
$sitename = $this->fun->accept('sitename', 'P');
$sitehttp = $this->fun->accept('sitehttp', 'P');
$sitedir = $this->fun->accept('sitedir', 'P');
$sitecode = $this->fun->accept('sitecode', 'P');
$siteip = $this->fun->accept('siteip', 'P');
$adminusername = $this->fun->accept('adminusername', 'P');
$time = time();
$db_table = db_prefix . 'site';
if ($inputclass == 'add') {
$db_field = 'pid,sitename,sitehttp,sitedir,sitecode,siteip,adminusername,addtime';
$db_values = "50,'{$sitename}','{$sitehttp}','{$sitedir}','{$sitecode}','{$siteip}','{$adminusername}',{$time}";
$this->db->query('INSERT INTO ' . $db_table . ' (' . $db_field . ') VALUES (' . $db_values . ')');
$this->writelog($this->lng['sitemain_log_add'], $this->lng['log_extra_ok'] . ' 群点名称=' . $sitename);
exit('true');
} else {
$slid = $this->fun->accept('slid', 'P');
$db_where = 'slid=' . $slid;
$db_set = "sitename='{$sitename}',sitehttp='{$sitehttp}',sitedir='{$sitedir}',sitecode='{$sitecode}',siteip='{$siteip}',adminusername='{$adminusername}'";
$this->db->query('UPDATE ' . $db_table . ' SET ' . $db_set . ' WHERE ' . $db_where);
$this->writelog($this->lng['sitemain_log_edit'], $this->lng['log_extra_ok'] . ' 群点名称=' . $sitename . ' id=' . $slid);
exit('true');
}
}
示例10: onsave
function onsave()
{
parent::start_template();
$inputclass = $this->fun->accept('inputclass', 'P');
$keycode = $this->fun->accept('keycode', 'P');
$title = $this->fun->accept('title', 'P');
$lng = $this->fun->accept('lng', 'P');
$langstr = $this->fun->accept('langstr', 'P');
$typeid = $this->fun->accept('typeid', 'P');
$db_table = db_prefix . 'lngpack';
if ($inputclass == 'add') {
$db_field = 'pid,lng,title,keycode,langstr,lockin,typeid';
$db_values = "50,'{$lng}','{$title}','{$keycode}','{$langstr}',0,{$typeid}";
$this->db->query('INSERT INTO ' . $db_table . ' (' . $db_field . ') VALUES (' . $db_values . ')');
$this->writelog($this->lng['languagepack_add_log'], $this->lng['log_extra_ok'] . ' title=' . $title);
$this->creat_lanpack($lng, true);
exit('true');
} else {
$lpid = $this->fun->accept('lpid', 'P');
$db_where = 'lpid=' . $lpid;
$db_set = "title='{$title}',langstr='{$langstr}',typeid={$typeid}";
$this->db->query('UPDATE ' . $db_table . ' SET ' . $db_set . ' WHERE ' . $db_where);
$this->creat_lanpack($lng, true);
$this->writelog($this->lng['languagepack_edit_log'], $this->lng['log_extra_ok'] . ' title=' . $title . ' id=' . $lpid);
exit('true');
}
}
示例11: onacmessagere
function onacmessagere()
{
parent::start_template();
$tab = $this->fun->accept('tab', 'R');
$tab = empty($tab) ? 'true' : $tab;
$type = $this->fun->accept('type', 'R');
$type = empty($type) ? 'edit' : $type;
$dmid = intval($this->fun->accept('dmid', 'R'));
if (empty($dmid)) {
exit('false');
}
$read = $this->get_docmessage_veiw($dmid);
$reBook = $this->get_documentview($read['did']);
$this->ectemplates->assign('articelread', $reBook);
if (!empty($read['userid'])) {
$rsMember = $this->get_member(null, $read['userid']);
}
$this->ectemplates->assign('member', $rsMember);
if (!empty($read['adminid'])) {
$rsAdmin = $this->get_admin_view(null, $read['adminid']);
}
$this->ectemplates->assign('adminview', $rsAdmin);
$input_default = $this->CON;
$this->ectemplates->assign('defaultinput', $input_default);
$this->ectemplates->assign('lng', $read['lng']);
$this->ectemplates->assign('read', $read);
$this->ectemplates->assign('path', admin_URL);
$this->ectemplates->assign('type', $type);
$this->ectemplates->assign('tab', $tab);
$this->ectemplates->display('article/article_message_edit');
}
示例12: onshipsave
function onshipsave()
{
parent::start_template();
$inputclass = $this->fun->accept('inputclass', 'P');
$title = $this->fun->accept('title', 'P');
$content = $this->fun->accept('content', 'P');
$price = $this->fun->accept('price', 'P');
$markup = $this->fun->accept('markup', 'P');
$iscash = $this->fun->accept('iscash', 'P');
$isinsure = $this->fun->accept('isinsure', 'P');
$isinsure = empty($isinsure) ? 0 : $isinsure;
$insureper = $this->fun->accept('insureper', 'P');
$insureper = empty($insureper) ? 0 : $insureper;
$db_table = db_prefix . 'order_shipping';
$date = time();
if ($inputclass == 'add') {
$db_field = 'pid,title,content,price,markup,isclass,iscash,isinsure,insureper,addtime';
$db_values = "50,'{$title}','{$content}',{$price},{$markup},0,{$iscash},{$isinsure},{$insureper},{$date}";
$this->db->query('INSERT INTO ' . $db_table . ' (' . $db_field . ') VALUES (' . $db_values . ')');
$this->writelog($this->lng['ordershipping_add_log'], $this->lng['log_extra_ok'] . ' title=' . $title);
$this->dbcache->clearcache('ordership_array', true);
exit('true');
} elseif ($inputclass == 'edit') {
$osid = $this->fun->accept('osid', 'P');
$db_where = 'osid=' . $osid;
$db_set = "title='{$title}',content='{$content}',price={$price},markup={$markup},iscash={$iscash},isinsure={$isinsure},insureper={$insureper}";
$this->db->query('UPDATE ' . $db_table . ' SET ' . $db_set . ' WHERE ' . $db_where);
$this->writelog($this->lng['ordershipping_edit_log'], $this->lng['log_extra_ok'] . ' title=' . $title . ' id=' . $osid);
$this->dbcache->clearcache('ordership_view_' . $osid, true);
$this->dbcache->clearcache('ordership_array', true);
exit('true');
}
}
示例13: intval
function in_list()
{
parent::start_pagetemplate();
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$fgid = intval($this->fun->accept('fgid', 'G'));
if (empty($fgid)) {
$this->callmessage($this->lng['db_err'], $_SERVER['HTTP_REFERER'], $this->lng['gobackurlbotton']);
}
$form = $this->get_form_purview($fgid);
$form['action'] = $this->get_link('acform', $form, admin_LNG);
$attrread = $this->get_formatt($fgid);
if ($form['titlestyle']) {
$titlestyleArray = array('{typename}' => $form['formgroupname'], '{sitename}' => $this->lng['sitename']);
$this->lng['sitename'] = $this->fun->formatstring($form['titlestyle'], $titlestyleArray);
} else {
$this->lng['sitename'] = $form['formgroupname'] . '-' . $this->lng['sitename'];
}
$this->pagetemplate->assign('lngpack', $this->lng);
$this->pagetemplate->assign('form', $form);
$this->pagetemplate->assign('array', $attrread);
$template = $form['template'] ? $form['template'] : 'form';
$this->pagetemplate->assign('path', 'form');
$this->pagetemplate->assign('current', $fgid);
$this->pagetemplate->assign('tokenkey', $this->fun->token());
$this->pagetemplate->assign('seccodelink', $this->get_link('seccode'));
$templatesDIR = $this->get_templatesdir('form');
$templatefilename = $lng . '/' . $templatesDIR . '/' . $template;
$this->pagetemplate->display($templatefilename, $form['formcode'] . '_list', false, $filename, admin_LNG);
}
示例14:
function in_index()
{
parent::start_pagetemplate();
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$this->pagetemplate->assign('mlink', $this->mlink);
$this->pagetemplate->assign('path', 'index');
$this->pagetemplate->display(admin_LNGDIR . 'index', 'index', false, null, admin_LNG);
}
示例15: onskinadd
function onskinadd()
{
parent::start_template();
$tab = $this->fun->accept('tab', 'G');
$tab = empty($tab) ? 'true' : $tab;
$this->ectemplates->assign('tab', $tab);
$this->ectemplates->assign('lng', $lng['list']);
$this->ectemplates->display('template/skin_add');
}