function get_multisite_attachment_image_src($img_id, $size, $blog_id = null) { if (empty($blog_id)) { $blog_id = get_site_id(); // main site for global resources } switch_to_blog($blog_id); $image = wp_get_attachment_image_src($img_id, $size); restore_current_blog(); return $image; }
public function chageSite() { if ($_SESSION['siteid'] = $_REQUEST['siteid']) { $res = CMS_M('website')->where('website_id=' . get_site_id())->find(); $_SESSION['tplPath'] = 'Templates/' . trim($res['weburl']); echo '1'; exit; } else { echo '0'; exit; } }
public function index() { if ($this->is_phone()) { $_SESSION['siteid'] = 2; $res = CMS_M('website')->where('website_id=' . get_site_id())->find(); $_SESSION['tplPath'] = 'Templates/' . trim($res['weburl']); } if (!empty($_REQUEST['siteid'])) { $_SESSION['siteid'] = $_REQUEST['siteid']; $res = CMS_M('website')->where('website_id=' . get_site_id())->find(); $_SESSION['tplPath'] = 'Templates/' . trim($res['weburl']); } $this->showTpl('index'); }
public function Category_edit() { //获取表格主建 $pk = M($this->cmTableName)->getPk(); $pkVal = $_REQUEST[$pk]; $this->getTpls(); //根据主键获取编辑的表单并分配 $res = M($this->cmTableName)->where($pk . '=' . $pkVal)->find(); D($this->cmTableName)->form->_getEditorForm($res); $this->assign('form', D($this->cmTableName)->form->editInfo); $this->assign('res', $res); $res = CMS_M('category')->where('siteid=' . get_site_id())->select(); $res = $this->getTree($res, $pid = 0); $this->assign('cat_list', $res); $this->display($this->cmTableName . '/edit'); }
public function Art_position_list() { Vendor('Form.TableList'); $list = new TableList(); //获取搜索列表条件 $where = $list->get_search_data($this->cmTableName); $where['siteid'] = get_site_id(); //根据条件获取列表 $rs = $list->auto_gen_list($this->cmTableName, $where); //分配列表信息 $this->assign('list', $rs['table_list']); //分配搜索表单信息 $this->assign('searchForm', $rs['search_form']); //获取并分配添加按钮 $add_btn = $list->gen_add_button($this->cmTableName); $this->assign('add_btn', $add_btn); //获取并分配Excel按钮 $excel_btn = $list->get_excel_btn($this->cmTableName); $this->assign('excel_btn', $excel_btn); $this->display($this->cmTableName . '/list'); }
private function _proccess_add_message($ebay_id, $itemInfo, $message_id) { $site = 'US'; if ($this->config->item('production')) { $this->appToken = $this->config->item('appToken'); $this->appToken = $this->appToken[$ebay_id]; } $this->ebay_config['siteToUseID'] = get_site_id($site); $this->ebay_config['callName'] = 'AddMemberMessageRTQ'; $this->load->library('ebayapi/EbaySession', $this->ebay_config); $xml = add_ebay_message($this->appToken, $itemInfo); var_dump($xml); $response = $this->xmlRequest($this->ebaysession, $xml); var_dump($response); if (isset($response->Ack) && $response->Ack == 'Success') { //var_dump($response); $staus = array('status' => 5, 'update_ebay' => 1); $this->ebay_model->update_ebay_message_by_id($message_id, $staus); } }
function get_manifest_to_be_import_details() { global $FLAG_MESSG; //i think the problem is that was linked to dbs3 root sytem connect_tablet(); $sql = 'SELECT DISTINCT idmanifest_reg, manifest_unq_num,driver_num,date_manifest,siteid,start_dbs,end_dbs FROM manifest_reg INNER JOIN manifest_counter ON idmanifest_reg=manifest_reg_idmanifest_reg WHERE manifest_counter.finished=1 AND closed=0'; $result = add_db($sql); global $origin_id; $tab = array(); for ($z = 0; $z <= 1000; $z++) { $tab[$z] = 0; } echo '<table>'; while ($rek = mysql_fetch_array($result, MYSQL_BOTH)) { //changed from 1 $i++; $origin_none_detect = 0; $id_manif_id = $rek['idmanifest_reg']; //if($tab[$rek["id_test"]]<'1') //{ //echo '<tr><td>'.$rek["Name_sub"].'</td>'; // echo '<td>'.$rek["kind"].'</td>'; //echo '<td>'.$rek["weight"].'</td>'; echo '<tr><td>' . $rek["idmanifest_reg"] . '</td>'; echo '<td>' . $rek["manifest_unq_num"] . '</td>'; echo '<td>' . $rek["date_manifest"] . '</td>'; echo '<td>' . $rek["closed"] . '</td>'; echo '<td>' . get_site_id($rek["siteid"]) . '</td>'; echo '<td>' . get_origin_id($origin_id) . '</td>'; echo '<td>' . $rek['driver_num'] . '</td>'; echo '<td>collected by ' . get_user_id($rek['driver_num']) . '</td>'; echo '<td>' . $rek['start_dbs'] . '</td>'; echo '<td>' . $rek['end_dbs'] . '</td>'; echo '<td> <form action="import_mobile_new.php" method="POST">'; $idmanifest_counter = $rek['idmanifest_reg']; $select_mani_count = "SELECT SUM(manifest_counter) as ile FROM manifest_counter WHERE manifest_reg_idmanifest_reg='{$idmanifest_counter}'"; $result_count = mysql_query($select_mani_count); //echo mysql_error(); $rek_count = mysql_fetch_array($result_count); echo "<td>" . $rek_count['ile'] . "</td>"; echo "<td>"; if (($or_id = root_system_origin(tablet_detect_origins($origin_id))) != 0) { echo "DTCT: " . $or_id . " PO " . ($post_code = search_post_code_on_root(get_post_code(tablet_detect_origins($origin_id)))); if (empty($post_code)) { $origin_none_detect = 1; } } else { //tablet can detect and pass to get postcode echo "Got post codeL" . ($post_code = get_post_code(tablet_detect_origins($origin_id))); if (tablet_system_origin_post_code($post_code) == root_system_origin_post_code($post_code)) { echo "in root system that post code" . tablet_system_origin_post_code($post_code); $origin_none_detect = 0; } else { $origin_none_detect = 1; } //echo "none in the root"; // draw_origin_form(); } connect_tablet(); // echo get_origin_id($originid); echo "</td>"; echo "<td>"; echo $rek['driver_num']; $name_sub_cat = $rek['id']; echo '</td><td><input type="checkbox" name="att_ck" value="'; if (isset($_POST['att_ck'])) { echo 'checked'; } echo '">' . $rek[type_2] . '<br>'; //echo '</td><td><input style="padding:10px;margin:10px" type="text" name="batch_date" value="'.htmlentities($weight).'">'; echo '<input style="padding:10px;margin:10px" type="hidden" placeholder="Item type" name="name_sub_cat" value="' . htmlentities($name_sub_cat) . '">'; echo '<input type="hidden" name="submitted" value="1" >'; echo '<input type="hidden" name="id_manif_id" value="' . $id_manif_id . '" >'; if ($origin_none_detect != 1) { echo "<input style='padding:10px;margin:10px' type='submit' name='Submit' value='Import' align='right'>"; } else { //perform operation $FLAG_MESSG .= "Detected in root: " . ($origin_id_from_root = tablet_detect_origins($origin_id)); echo $origin_id_from_root; //if the case is none specified origin in the root system draw_origin_form($origin_id_from_root); } echo '</tr>'; //echo '<td>'.$rek["sum_weight"].'</td>'; // echo '<td>'.$rek["Name_sub"].'</td>'; //} echo "</form></td>"; //$tab[$rek["id_test"]]+=1; } echo '</tr></table><BR />'; }
function getByModules($module_id = 0, $where_2 = '', $siteid = 0, $order = '', $num = 100) { if ($module_id == 0) { throw new Exception('getByModules Param Error'); } $table = CMS_M('cm_table')->where('table_id=' . $module_id)->find(); $table_name = $table['table_name']; $con_m = CMS_M($table_name); $pk = $con_m->getPk(); $where = ''; if ($siteid == 0) { $where = 'siteid=' . get_site_id(); } else { $where = 'siteid=' . $siteid; } if (!empty($where_2)) { $where .= ' AND ' . $where_2; } //echo 'abc'; //AAA($where); $order = $order == '' ? $table_name . '_sort ASC,' . $pk . ' DESC' : $order; import('ORG.Util.Page'); $count = $con_m->where($where)->order($order)->count(); $Page = new Page($count, $num); $show = $Page->show(); $list = $con_m->where($where)->order($order)->limit($Page->firstRow . ',' . $Page->listRows)->select(); $articles = array(); $articles['lists'] = $list; $articles['page'] = $show; return $list; }
function is_primary_landing_page() { return get_current_blog_id() == get_site_id() && is_front_page(); }
echo get_multisite_bloginfo(get_site_id('bathworks'), 'name'); ?> "></a></li> <li><a href="#f-tab2" data-url="<?php if (get_current_blog_id() == 2) { bloginfo('url'); } ?> " class="<?php echo get_current_blog_id() == 2 ? "active current" : ""; ?> "><img src="<?php bloginfo('url'); ?> /ui/images/pv-express-logo.png" width="141" height="84" alt="<?php echo get_multisite_bloginfo(get_site_id('express'), 'name'); ?> "></a></li> </ul> </div> </div><!--f-tab-top--> <div class="wrap f-tab-content-wrap"> <?php $blog_ids = array(1, 3, 2); foreach ($blog_ids as $id) { ?> <div id="f-tab<?php echo $id; ?> " class="clearfix f-tab-content"> <div class="pull-left">
</span> </a> </li> <li> <a href="<?php echo get_field('pv_bathworks_url', 'options'); ?> "> <div class="middle-circle"></div> <div class="logo-s"> <img src="ui/images/pv-bath-logo.png" width="231" height="130" alt="<?php echo get_multisite_bloginfo(get_site_id('bathworks'), 'name'); ?> " class="def" /> <img src="ui/images/pv-bath-white.png" width="231" height="130" alt="<?php echo get_multisite_bloginfo(get_site_id('bathworks'), 'name'); ?> " class="hover" /> </div> <h3><?php echo get_field('pv_bathworks_heading'); ?> </h3> <p><?php echo get_field('pv_bathworks_subheading'); ?> </p> <span class="link green-link"><?php echo get_field('pv_bathworks_call_to_action_label');
} echo '<table>'; while ($rek = mysql_fetch_array($result, MYSQL_BOTH)) { //changed from 1 $i++; $id_manif_id = $rek['idmanifest_reg']; //if($tab[$rek["id_test"]]<'1') //{ //echo '<tr><td>'.$rek["Name_sub"].'</td>'; // echo '<td>'.$rek["kind"].'</td>'; //echo '<td>'.$rek["weight"].'</td>'; echo '<tr><td>' . $rek["idmanifest_reg"] . '</td>'; echo '<td>' . $rek["manifest_unq_num"] . '</td>'; echo '<td>' . $rek["date_manifest"] . '</td>'; echo '<td>' . $rek["closed"] . '</td>'; echo '<td>' . get_site_id($rek["siteid"]) . '</td>'; echo '<td>' . get_origin_id($origin_id) . '</td>'; echo '<td>' . $rek['driver_num'] . '</td>'; echo '<td>collected by ' . get_user_id($rek['driver_num']) . '</td>'; echo '<td>' . $rek['start_dbs'] . '</td>'; echo '<td>' . $rek['end_dbs'] . '</td>'; echo '<td> <form action="import_mobile.php" method="POST">'; $idmanifest_counter = $rek['idmanifest_reg']; $select_mani_count = "SELECT SUM(manifest_counter) as ile FROM manifest_counter WHERE manifest_reg_idmanifest_reg='{$idmanifest_counter}'"; $result_count = mysql_query($select_mani_count); echo mysql_error(); $rek_count = mysql_fetch_array($result_count); echo "<td>" . $rek_count['ile'] . "</td>"; echo $rek['driver_num']; $name_sub_cat = $rek['id']; echo '</td><td><input type="checkbox" name="att_ck" value="';
public function get_has_ebay_order() { if (strpos($_SERVER['SCRIPT_FILENAME'], 'get_has_ebay_order.php') === FALSE) { exit; } $orders = $this->ebay_order_model->get_has_ebay_orders(); $site = 'US'; foreach ($orders as $order) { $ebay_id = $order->ebay_id; if (empty($ebay_id)) { $ebay_id = $ebay_ids[$order->to_email]; if (empty($ebay_id)) { return; } } if ($this->config->item('production')) { $this->appToken = $this->config->item('appToken'); $this->appToken = $this->appToken[$ebay_id]; } $this->ebay_config['siteToUseID'] = get_site_id($site); $this->ebay_config['callName'] = 'GetOrderTransactions'; $this->load->library('ebayapi/EbaySession', $this->ebay_config); $xml = get_transaction_by_id($this->appToken, $order->transaction_id, $order->item_id); var_dump($xml); $response = $this->xmlRequest($this->ebaysession, $xml); var_dump($response); die("zhaosenlin"); echo $order->transaction_id . '\\n'; //$this->_complete_sale($order->order_id); } }
<body> <h2 style="">欢迎: <?php echo $_SESSION['username']; ?> </h2> <select id="site" class="selectArea" > <option value="0" >---切换站点---</option> <?php foreach ($websiteInfo as $row) { ?> <option value="<?php echo $row['website_id']; ?> " <?php if (get_site_id() == $row['website_id']) { echo 'selected="true"'; } ?> txt="<?php echo $row['webname']; ?> " >---<?php echo $row['webname']; ?> ---</option> <?php } ?> </select>
?> <section class="pg-module"> <div class="wrap pg-content single-pg-content"> <div class="pg-top clearfix"> <div class="main-left"> <h2><?php echo get_multisite_field('404_heading', get_site_id(), 'options'); ?> </h2> </div> </div><!--pg-top--> <div class="pg-body clearfix"> <?php if (get_multisite_field('404_subtext', get_site_id(), 'options')) { ?> <p> <?php echo get_multisite_field('404_subtext', get_site_id(), 'options'); ?> </p> <?php } ?> </div><!--pg-body--> </div> </section> <?php get_footer();