/**
  * @param Hypercharge\IUrl $url
  * @param Hypercharge\IRequest $request
  * @return Hypercharge\IResponse
  * @throws Hypercharge\Error
  */
 public function call(IUrl $url, IRequest $request)
 {
     $curl = Config::getFactory()->createHttpsClient(Config::getUser(), Config::getPassword());
     $serializer = new XmlSerializer();
     $responseStr = $curl->xmlPost($url->get(), $serializer->toXml($request));
     $responseDom = new \SimpleXMLElement($responseStr);
     return $request->createResponse(XmlSerializer::dom2hash($responseDom));
 }
Beispiel #2
0
 public static function submenu($limitright)
 {
     $controllerObj = Mysite::$app->getController();
     $controller = $controllerObj->getcontroller();
     $action = $controllerObj->getaction();
     $currentlink = '/' . $controller . '/' . $action;
     $vcurrent = '/' . $controller . '/';
     $link = IUrl::creatUrl('/other/ucenter');
     $linkarray = array();
     $is_find = false;
     $alllimit = self::$limitmenu;
     $doarray = array_keys($alllimit);
     //所有限制权限
     $limitarray = explode(',', $limitright);
     //拥有权限
     foreach (self::$menu as $key => $value) {
         $temsublink = array();
         $defalturl = '';
         $i = 0;
         foreach ($value as $linkurl => $linkname) {
             //panduan linkurl 是否存在  limitright;
             //不存在continue;
             $checkrightname = explode('/', $linkurl);
             if (in_array($checkrightname[2], $doarray)) {
                 if (!in_array($checkrightname[2], $limitarray)) {
                     continue;
                 }
             }
             $tempone = array();
             $tempone['is_curent'] = false;
             if ($currentlink == $linkurl) {
                 $tempone['is_curent'] = true;
                 $is_find = true;
             }
             $linkurl = substr($linkurl, 1, strlen($linkurl));
             $tempone['urls'] = IUrl::creatUrl($linkurl);
             $tempone['name'] = $linkname;
             $temsublink[] = $tempone;
             if ($i == 0) {
                 $defalturl = $tempone['urls'];
             }
             $i++;
         }
         if (empty($defalturl)) {
             continue;
         }
         $tempuplink = array();
         $tempuolink['is_curent'] = false;
         if ($is_find == true) {
             $tempuolink['is_curent'] = true;
         }
         //continue;
         $tempuolink['urls'] = $defalturl;
         $tempuolink['name'] = $key;
         $tempuolink['det'] = $temsublink;
         $linkarray[] = $tempuolink;
         $is_find = false;
     }
     return $linkarray;
 }
Beispiel #3
0
 function savesingle()
 {
     $id = IReq::get('uid');
     $data['addtime'] = strtotime(IReq::get('addtime') . ' 00:00:00');
     $data['title'] = IReq::get('title');
     $data['content'] = IReq::get('content');
     $data['code'] = IReq::get('code');
     $data['seo_key'] = IFilter::act(IReq::get('seo_key'));
     $data['seo_content'] = IFilter::act(IReq::get('seo_content'));
     if (empty($id)) {
         $link = IUrl::creatUrl('adminpage/single/module/addsingle');
         if (empty($data['content'])) {
             $this->message('单页内容不能为空', $link);
         }
         if (empty($data['title'])) {
             $this->message('单页标题不能为空', $link);
         }
         $this->mysql->insert(Mysite::$app->config['tablepre'] . 'single', $data);
     } else {
         $link = IUrl::creatUrl('single/addsingle/id/' . $id);
         if (empty($data['content'])) {
             $this->message('单页内容不能为空', $link);
         }
         if (empty($data['title'])) {
             $this->message('单页标题不能为空', $link);
         }
         $this->mysql->update(Mysite::$app->config['tablepre'] . 'single', $data, "id='" . $id . "'");
     }
     $link = IUrl::creatUrl('adminpage/single/module/singlelist');
     $this->success('操作成功', $link);
 }
Beispiel #4
0
 /**
  * @brief 商品添加中图片上传的方法
  */
 static function goods_img_upload()
 {
     //获得配置文件中的数据
     $config = new Config("site_config");
     $config_info = $config->getInfo();
     $list_thumb_width = isset($config_info['list_thumb_width']) ? $config_info['list_thumb_width'] : 175;
     $list_thumb_height = isset($config_info['list_thumb_height']) ? $config_info['list_thumb_height'] : 175;
     $show_thumb_width = isset($config_info['show_thumb_width']) ? $config_info['show_thumb_width'] : 85;
     $show_thumb_height = isset($config_info['show_thumb_height']) ? $config_info['show_thumb_height'] : 85;
     //调用文件上传类
     $photoObj = new PhotoUpload();
     $photoObj->setThumb($show_thumb_width, $show_thumb_height, 'show');
     $photoObj->setThumb($list_thumb_width, $list_thumb_height, 'list');
     $photo = $photoObj->run();
     //判断上传是否成功,如果float=1则成功
     if ($photo['Filedata']['flag'] == 1) {
         $list = $photo['Filedata']['thumb']['list'];
         $list = strrchr($list, '/');
         $id = substr($list, 1, strpos($list, '_') - 1);
         $show = $photo['Filedata']['thumb']['show'];
         $img = $photo['Filedata']['img'];
         echo IUrl::creatUrl() . $show . '|' . $show . '|' . $img . '|' . $id . '|' . $photo['Filedata']['thumb']['list'] . '|' . '_' . $show_thumb_width . '_' . $show_thumb_height;
         exit;
     } else {
         echo '0';
         exit;
     }
 }
Beispiel #5
0
 /**
  * @brief 构造函数
  * @param $payment_id 支付方式ID
  */
 public function __construct($payment_id)
 {
     //回调函数地址
     $this->callbackUrl = IUrl::getHost() . IUrl::creatUrl("/block/callback/_id/" . $payment_id);
     //回调业务处理地址
     $this->serverCallbackUrl = IUrl::getHost() . IUrl::creatUrl("/block/server_callback/_id/" . $payment_id);
 }
Beispiel #6
0
 function user_ico_upload()
 {
     $result = array('isError' => true);
     if (isset($_FILES['attach']['name']) && $_FILES['attach']['name'] != '') {
         $photoObj = new PhotoUpload();
         $photo = $photoObj->run();
         if ($photo['attach']['img']) {
             $user_id = $this->user['user_id'];
             $user_obj = new IModel('user');
             $dataArray = array('head_ico' => $photo['attach']['img']);
             $user_obj->setData($dataArray);
             $where = 'id = ' . $user_id;
             $isSuss = $user_obj->update($where);
             if ($isSuss !== false) {
                 $result['isError'] = false;
                 $result['data'] = IUrl::creatUrl() . $photo['attach']['img'];
                 ISafe::set('head_ico', $dataArray['head_ico']);
             } else {
                 $result['message'] = '上传失败';
             }
         } else {
             $result['message'] = '上传失败';
         }
     } else {
         $result['message'] = '请选择图片';
     }
     echo '<script type="text/javascript">parent.callback_user_ico(' . JSON::encode($result) . ');</script>';
 }
Beispiel #7
0
    /**
     * 构造函数
     * @param string $style 风格
     */
    public function __construct($style = 'red')
    {
        $this->path = IUrl::creatUrl() . 'plugins/sonline/';
        echo <<<OEF
\t<link rel="stylesheet" href="{$this->path}style/{$style}.css" />
\t<script type="text/javascript" src="{$this->path}js/jquery.Sonline.js"></script>
OEF;
    }
Beispiel #8
0
 public static function get($image_url, $width = 100, $height = 100)
 {
     $ext = strrchr($image_url, '.');
     $end = intval("-" . strlen($ext));
     $real_url = substr($image_url, 0, $end) . "_{$width}_{$height}" . $ext;
     if (file_exists($real_url)) {
         return IUrl::creatUrl("") . $real_url;
     }
     return IUrl::creatUrl("") . PhotoUpload::thumb($image_url, $width, $height, "_{$width}_{$height}");
 }
Beispiel #9
0
 /**
  * 获取版权信息,存储到缓存中进行比对
  * @return boolean
  */
 public static function getAuthorize()
 {
     $iwebshopAuthorize = ISafe::get('iwebshopAuthorize');
     if ($iwebshopAuthorize === null) {
         $return = self::send('_c=system&_a=authorize&host=' . IUrl::getHost());
         $iwebshopAuthorize = isset($return['success']) && $return['success'] == 1 ? true : false;
         ISafe::set('iwebshopAuthorize', $iwebshopAuthorize);
     }
     return $iwebshopAuthorize;
 }
 public function checkshoplogin()
 {
     $link = IUrl::creatUrl('member/shoplogin');
     if ($this->member['uid'] == 0 && $this->admin['uid'] == 0) {
         $this->message('未登陆', $link);
     }
     $shopid = ICookie::get('adminshopid');
     if (empty($shopid)) {
         $this->message('未登陆', $link);
     }
 }
Beispiel #11
0
 function wxmenu()
 {
     //构造微信 menu
     $wxtoken = Mysite::$app->config['wxtoken'];
     $errorlink = IUrl::creatUrl('adminpage/weixin/module/wxset');
     if (empty($wxtoken)) {
         $this->message('未设置微信基本信息', $errorlink);
     }
     $data['wxmenu'] = $this->mysql->getarr("select * from   " . Mysite::$app->config['tablepre'] . "wxmenu order by sort desc");
     Mysite::$app->setdata($data);
 }
Beispiel #12
0
 /**
  * @brief 构造函数
  */
 public function __construct()
 {
     $payName = str_replace('pay_', '', get_class($this));
     //获取域名地址
     $sUrl = IUrl::getHost() . IUrl::creatUrl();
     $sUrl = str_replace('plugins/', '', $sUrl);
     //回调函数地址
     $this->callbackUrl = str_replace('plugins/', '', IUrl::getHost() . IUrl::creatUrl("/block/callback/payment_name/{$payName}"));
     //回调业务处理地址
     $this->serverCallbackUrl = str_replace('plugins/', '', IUrl::getHost() . IUrl::creatUrl("/block/server_callback/payment_name/{$payName}"));
 }
Beispiel #13
0
    /**
     * @brief 展示插件
     * @param string $name 用户名
     * @param string $pwd  密码
     */
    public function show($name = '', $pwd = '')
    {
        $sessionName = ISafe::name();
        $sessionId = ISafe::id();
        $uploadUrl = IUrl::creatUrl($this->submit);
        $admin_name = $name == '' ? ISafe::get('admin_name') : $name;
        $admin_pwd = $pwd == '' ? ISafe::get('admin_pwd') : $pwd;
        echo <<<OEF
\t\t<script type="text/javascript">
\t\twindow.onload = function()
\t\t{
\t\t\tnew SWFUpload({
\t\t\t\t// Backend Settings
\t\t\t\tupload_url: "{$uploadUrl}",
\t\t\t\tpost_params: {"{$sessionName}": "{$sessionId}","admin_name":"{$admin_name}","admin_pwd":"{$admin_pwd}"},

\t\t\t\t// File Upload Settings
\t\t\t\tfile_types : "*.jpg;*.jpge;*.png;*.gif",

\t\t\t\t// Event Handler Settings - these functions as defined in Handlers.js
\t\t\t\t//  The handlers are not part of SWFUpload but are part of my website and control how
\t\t\t\t//  my website reacts to the SWFUpload events.
\t\t\t\tswfupload_preload_handler : preLoad,
\t\t\t\tswfupload_load_failed_handler : loadFailed,
\t\t\t\tfile_queue_error_handler : fileQueueError,
\t\t\t\tfile_dialog_complete_handler : fileDialogComplete,
\t\t\t\tupload_progress_handler : uploadProgress,
\t\t\t\tupload_error_handler : uploadError,
\t\t\t\tupload_success_handler : uploadSuccess,
\t\t\t\tupload_complete_handler : uploadComplete,

\t\t\t\t// Button Settings
\t\t\t\tbutton_placeholder_id : "uploadButton",
\t\t\t\tbutton_width: 50,
\t\t\t\tbutton_height: 21,
\t\t\t\tbutton_text : '选择...',
\t\t\t\tbutton_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
\t\t\t\tbutton_cursor: SWFUpload.CURSOR.HAND,

\t\t\t\t// Flash Settings
\t\t\t\tflash_url : "{$this->path}swfupload.swf",

\t\t\t\tcustom_settings : {
\t\t\t\t\tupload_target : "divFileProgressContainer"
\t\t\t\t},

\t\t\t\t// Debug Settings
\t\t\t\tdebug: false
\t\t\t});
\t\t};
\t\t</script>
OEF;
    }
Beispiel #14
0
 function savearea()
 {
     $checinfo = Mysite::$app->config['psset'];
     if (empty($checinfo)) {
         $link = IUrl::creatUrl('area/adminpsset');
         $this->message('请进行网站配送设置', $link);
     }
     $id = intval(IReq::get('uid'));
     $data['name'] = IReq::get('name');
     $data['orderid'] = intval(IReq::get('orderid'));
     $data['pin'] = IReq::get('pin');
     $data['parent_id'] = intval(IReq::get('parent_id'));
     $data['imgurl'] = IReq::get('imgurl');
     $data['is_com'] = intval(IReq::get('is_com'));
     if (empty($id)) {
         $data['lng'] = 0;
         $data['lat'] = 0;
         $link = IUrl::creatUrl('area/adminarealist');
         if (empty($data['name'])) {
             $this->message('地区名称不能为空', $link);
         }
         if (empty($data['pin'])) {
             $this->message('拼音字母不能为空', $link);
         }
         if ($data['parent_id'] == 0 && empty($data['imgurl'])) {
             $this->message('地址图标不能为空', $link);
         }
         $this->mysql->insert(Mysite::$app->config['tablepre'] . 'area', $data);
         $areatempid = $this->mysql->insertid();
         $tempdata['areaid'] = $areatempid;
         $tempdata['shopid'] = 0;
         $tempdata['cost'] = 0;
         $this->mysql->insert(Mysite::$app->config['tablepre'] . "areatoadd", $tempdata);
         $tempdata2['areaid'] = $areatempid;
         $tempdata2['shopid'] = 0;
         $this->mysql->insert(Mysite::$app->config['tablepre'] . "areashop", $tempdata2);
     } else {
         $link = IUrl::creatUrl('area/adminarealist/id/' . $id);
         if (empty($data['name'])) {
             $this->message('地区名称不能为空', $link);
         }
         if (empty($data['pin'])) {
             $this->message('拼音字母不能为空', $link);
         }
         if ($data['parent_id'] == 0 && empty($data['imgurl'])) {
             $this->message('地址图标不能为空', $link);
         }
         $this->mysql->update(Mysite::$app->config['tablepre'] . 'area', $data, "id='" . $id . "'");
     }
     $link = IUrl::creatUrl('area/adminarealist');
     $this->success('操作成功!', $link);
 }
 /**
  * @brief 创建当前的Controller对象
  * @return object Controller对象
  */
 public function createController()
 {
     $controller = IUrl::getInfo("controller");
     if ($controller === null) {
         $controller = $this->defaultController;
     }
     if (class_exists($controller)) {
         $controllerClass = new $controller($this, $controller);
     } else {
         $controllerClass = new IController($this, $controller);
     }
     $this->controller = $controllerClass;
     return $controllerClass;
 }
 /**
  * @brief 创建当前的Controller对象
  * @return object Controller对象
  */
 public function createController()
 {
     $ctrlId = IUrl::getInfo("controller");
     if ($ctrlId == '') {
         $ctrlId = $this->defaultController;
     }
     if (class_exists($ctrlId)) {
         $ctrlObject = new $ctrlId($this, $ctrlId);
     } else {
         $ctrlObject = new IController($this, $ctrlId);
     }
     $this->controller = $ctrlObject;
     return $this->controller;
 }
Beispiel #17
0
 public function wxmenu()
 {
     $this->checkshoplogin();
     $shopid = ICookie::get('adminshopid');
     if ($shopid > 0) {
         //构造微信 menu
         $wechat = $this->mysql->select_one("select * from " . Mysite::$app->config['tablepre'] . "shop_wechat where shopid={$shopid}");
         $errorlink = IUrl::creatUrl('weixin/wxset');
         if (empty($wechat)) {
             $this->message('未设置微信基本信息', $errorlink);
         }
         $data['wxmenu'] = $this->mysql->getarr("select * from   " . Mysite::$app->config['tablepre'] . "shop_wxmenu where shopid={$shopid} order by sort desc");
     }
     Mysite::$app->setdata($data);
 }
Beispiel #18
0
 /**
  * @brief 发送到货通知邮件
  */
 function notify_send()
 {
     $smtp = new SendMail();
     $error = $smtp->getError();
     if ($error) {
         $return = array('isError' => true, 'message' => $error);
         echo JSON::encode($return);
         exit;
     }
     $notify_ids = IFilter::act(IReq::get('notifyid'));
     $message = '';
     if ($notify_ids && is_array($notify_ids)) {
         $ids = join(',', $notify_ids);
         $query = new IQuery("notify_registry as notify");
         $query->join = "right join goods as goods on notify.goods_id=goods.id left join user as u on notify.user_id = u.id";
         $query->fields = "notify.*,u.username,goods.name as goods_name,goods.store_nums";
         $query->where = "notify.id in(" . $ids . ")";
         $items = $query->find();
         //库存大于0,且处于未发送状态的 发送通知
         $succeed = 0;
         $failed = 0;
         $tb_notify_registry = new IModel('notify_registry');
         foreach ($items as $value) {
             $body = mailTemplate::notify(array('{goodsName}' => $value['goods_name'], '{url}' => IUrl::getHost() . IUrl::creatUrl('/site/products/id/' . $value['goods_id'])));
             $status = $smtp->send($value['email'], "到货通知", $body);
             if ($status) {
                 //发送成功
                 $succeed++;
                 $data = array('notify_time' => ITime::getDateTime(), 'notify_status' => '1');
                 $tb_notify_registry->setData($data);
                 $tb_notify_registry->update('id=' . $value['id']);
             } else {
                 //发送失败
                 $failed++;
             }
         }
     }
     $return = array('isError' => false, 'count' => count($items), 'succeed' => $succeed, 'failed' => $failed);
     echo JSON::encode($return);
 }
Beispiel #19
0
 function goodsupload()
 {
     $link = IUrl::creatUrl('member/login');
     if ($this->member['uid'] == 0 && $this->admin['uid'] == 0) {
         $this->message('未登陆', $link);
     }
     $type = IReq::get('type');
     $goodsid = intval(IReq::get('goodsid'));
     $shopid = ICookie::get('adminshopid');
     if ($shopid < 0) {
         echo '无权限操作';
         exit;
     }
     if (is_array($_FILES) && isset($_FILES['imgFile'])) {
         $json = new Services_JSON();
         $uploadpath = 'upload/shop/';
         $filepath = '/upload/shop/';
         $upload = new upload($uploadpath, array('gif', 'jpg', 'jpge', 'doc', 'png'));
         //upload
         $file = $upload->getfile();
         if ($upload->errno != 15 && $upload->errno != 0) {
             echo "<script>parent.uploaderror('" . json_encode($upload->errmsg()) . "');</script>";
         } else {
             if ($goodsid > 0 && $shopid > 0) {
                 $data['img'] = $filepath . $file[0]['saveName'];
                 $this->mysql->update(Mysite::$app->config['tablepre'] . 'goods', $data, "id='" . $goodsid . "' and shopid='" . $shopid . "'");
             }
             echo "<script>parent.uploadsucess('" . $filepath . $file[0]['saveName'] . "');</script>";
         }
         exit;
     }
     $imgurl = '';
     if ($goodsid > 0 && $type == 'goods') {
         $temp = $this->mysql->select_one("select img from " . Mysite::$app->config['tablepre'] . "goods where id='" . $goodsid . "' and shopid='" . $shopid . "'");
         $imgurl = $temp['img'];
     }
     Mysite::$app->setdata(array('type' => $type, 'goodsid' => $goodsid, 'imgurl' => $imgurl));
 }
Beispiel #20
0
 public function savesingle()
 {
     $this->checkshoplogin();
     $shopid = ICookie::get('adminshopid');
     if ($shopid <= 0) {
         $this->message('获取失败');
     }
     $id = IReq::get('uid');
     $data['addtime'] = strtotime(IReq::get('addtime') . ' 00:00:00');
     $data['title'] = IReq::get('title');
     $data['content'] = IReq::get('content');
     $data['code'] = IReq::get('code');
     $data['seo_key'] = IFilter::act(IReq::get('seo_key'));
     $data['seo_content'] = IFilter::act(IReq::get('seo_content'));
     $data['shop_id'] = $shopid;
     if (empty($id)) {
         $link = IUrl::creatUrl('single/addsingle');
         if (empty($data['content'])) {
             $this->message('单页内容不能为空', $link);
         }
         if (empty($data['title'])) {
             $this->message('单页标题不能为空', $link);
         }
         $this->mysql->insert(Mysite::$app->config['tablepre'] . 'shop_single', $data);
     } else {
         $link = IUrl::creatUrl('single/addsingle/id/' . $id);
         if (empty($data['content'])) {
             $this->message('单页内容不能为空', $link);
         }
         if (empty($data['title'])) {
             $this->message('单页标题不能为空', $link);
         }
         $this->mysql->update(Mysite::$app->config['tablepre'] . 'shop_single', $data, "single_id='" . $id . "' and shop_id={$shopid}");
     }
     $link = IUrl::creatUrl('single/singlelist');
     $this->success('操作成功', $link);
 }
Beispiel #21
0
			$(".list_table tr").hover(
				function () {
					$(this).addClass("sel");
				},
				function () {
					$(this).removeClass("sel");
				}
			);

			//后台菜单创建
			<?php 
$menu = new Menu();
?>
			var data = <?php 
echo $menu->submenu();
?>
;
			var current = '<?php 
echo $menu->current;
?>
';
			var url='<?php 
echo IUrl::creatUrl("/");
?>
';
			initMenu(data,current,url);
		});
	</script>
</body>
</html>
Beispiel #22
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" href="<?php 
echo IUrl::creatUrl("") . "views/" . $this->theme . "/skin/" . $this->skin . "/css/admin.css";
?>
" />
<script type="text/javascript" charset="UTF-8" src="<?php 
echo BASE_URL;
?>
/runtime/_systemjs/jquery/jquery-1.11.3.min.js"></script><script type="text/javascript" charset="UTF-8" src="<?php 
echo BASE_URL;
?>
/runtime/_systemjs/jquery/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php 
echo BASE_URL;
?>
/runtime/_systemjs/artdialog/artDialog.js"></script><script type="text/javascript" charset="UTF-8" src="<?php 
echo BASE_URL;
?>
/runtime/_systemjs/artdialog/plugins/iframeTools.js"></script><link rel="stylesheet" type="text/css" href="<?php 
echo BASE_URL;
?>
/runtime/_systemjs/artdialog/skins/default.css" />
</head>
<body style='width:420px;min-height:120px;'>
<div class="pop_win">
	<div class="content">
		<form action="<?php 
Beispiel #23
0
 /**
  * 用户在编辑器里上传图片
  */
 public function upload_img_from_editor()
 {
     $checkRight = new checkRights($this);
     $checkRight->checkAdminRights();
     $photoUpload = new PhotoUpload();
     $photoUpload->setIterance(false);
     $re = $photoUpload->run();
     if (isset($re['imgFile']['flag']) && $re['imgFile']['flag'] == 1) {
         $filePath = IUrl::creatUrl() . $re['imgFile']['dir'] . $re['imgFile']['name'];
         echo JSON::encode(array('error' => 0, 'url' => $filePath));
         exit;
     } else {
         $this->alert("上传失败");
     }
 }
 /**
  * @brief 获取路由缓存
  * @return array
  */
 private static function getRouteCache()
 {
     //配置文件中不存在路由规则
     if (self::$urlRoute === false) {
         return null;
     }
     //存在路由的缓存信息
     if (self::$urlRoute) {
         return self::$urlRoute;
     }
     //第一次初始化
     $routeList = isset(IWeb::$app->config['urlRoute']) ? IWeb::$app->config['urlRoute'] : array();
     if (empty($routeList)) {
         self::$urlRoute = false;
         return null;
     }
     $cacheRoute = array();
     foreach ($routeList as $key => $val) {
         if (is_array($val)) {
             continue;
         }
         $tempArray = explode('/', trim($val, '/'), 3);
         if ($tempArray < 2) {
             continue;
         }
         //进行路由规则的级别划分,$level越低表示匹配优先
         $level = 3;
         if ($tempArray[0] != '<' . self::UrlCtrlName . '>' && $tempArray[1] != '<' . self::UrlActionName . '>') {
             $level = 0;
         } elseif ($tempArray[0] == '<' . self::UrlCtrlName . '>' && $tempArray[1] != '<' . self::UrlActionName . '>') {
             $level = 1;
         } elseif ($tempArray[0] != '<' . self::UrlCtrlName . '>' && $tempArray[1] == '<' . self::UrlActionName . '>') {
             $level = 2;
         }
         $cacheRoute[$level][$key] = $val;
     }
     if (empty($cacheRoute)) {
         self::$urlRoute = false;
         return null;
     }
     ksort($cacheRoute);
     self::$urlRoute = $cacheRoute;
     return self::$urlRoute;
 }
Beispiel #25
0
 function res_act()
 {
     $name = IFilter::act(IReq::get('name'));
     if (is_array($name) && $name) {
         $backupObj = new DBBackup($name);
         $backupObj->runRes();
         $result = array('isError' => false, 'redirect' => IUrl::creatUrl('/tools/db_bak'));
     } else {
         $result = array('isError' => true, 'message' => '请选择要导入的SQL文件');
     }
     echo JSON::encode($result);
 }
Beispiel #26
0
 public function __get($parms)
 {
     if ($parms == 'submitUrl') {
         return IUrl::getHost() . IUrl::creatUrl('/ucenter/payment_balance');
     }
 }
Beispiel #27
0
<script type='text/javascript' src="<?php 
echo IUrl::creatUrl("") . "views/" . $this->theme . "/javascript/admin.js";
?>
"></script>
</head>

<body style="width:500px;">
	<div class="pop_win">
		<ul class="red_box">
			<li>1、要采集的URL必须符合一定的规范,必须为商品最小分类的商品列表页面,比如:<a href="http://list.jd.com/1318-1464-1488-0-0-0-0-0-0-0-1-1-1-1-1-72-4137-0.html" class="blue">点击此处</a></li>
			<li>2、采集内容包括给定URL中的商品分类,商品模型,具体商品详情</li>
			<li>3、在线商品数据采集,由于包括图片的下载,所以对网速要求比较高,需要耐心等待</li>
		</ul>

		<form action='<?php 
echo IUrl::creatUrl("/goods/collect_goods");
?>
' method='post'>
			<table class="form_table" width="90%" cellspacing="0" cellpadding="0" border="0">
				<col width="120px" />
				<col />

				<tbody>
					<tr>
						<td>采集器:</td>
						<td>
							<select name='collect_name' class='auto' pattern='required'>
								<option value='jd'>京东商城采集器</option>
							</select>
						</td>
					</tr>
Beispiel #28
0
//列表页加入购物车统一接口
function joinCart_list(id)
{
	$.getJSON('<?php 
echo IUrl::creatUrl("/simple/getProducts");
?>
',{"id":id},function(content){
		if(!content)
		{
			joinCart_ajax(id,'goods');
		}
		else
		{
			var url = "<?php 
echo IUrl::creatUrl("/block/goods_list/goods_id/@goods_id@/type/radio/is_products/1");
?>
";
			url = url.replace('@goods_id@',id);
			artDialog.open(url,{
				id:'selectProduct',
				title:'选择货品到购物车',
				okVal:'加入购物车',
				ok:function(iframeWin, topWin)
				{
					var goodsList = $(iframeWin.document).find('input[name="id[]"]:checked');

					//添加选中的商品
					if(goodsList.length == 0)
					{
						alert('请选择要加入购物车的商品');
Beispiel #29
0
							<tr>
								<th valign="middle">用户名:</th><td><input class="normal" type="text" name="admin_name" alt="请填写用户名" /></td>
							</tr>
							<tr>
								<th valign="middle">密码:</th><td><input class="normal" type="password" name="password" alt="请填写密码" /></td>
							</tr>
							<tr>
								<th valign="middle">验证码:</th><td><input style="width:85px" type='text' class='normal' name='captcha' pattern='^\w{5,10}$' alt='填写下面图片所示的字符' /><label>填写下图所示字符</label></td>
						  	</tr>
							<tr class="low">
								<th></th>
								<td><img src='<?php 
echo IUrl::creatUrl("/simple/getCaptcha/w/90/h/30/s/15");
?>
' id='captchaImg' /><span class="light_gray">看不清?<a class="link" href="javascript:changeCaptcha('<?php 
echo IUrl::creatUrl("/simple/getCaptcha/w/90/h/30/s/15");
?>
');">换一张</a></span></td>
							</tr>
							<tr>
								<th valign="middle"></th><td><input class="submit" type="submit" value="登录" /><input class="submit" type="reset" value="取消" /></td>
							</tr>
						</table>
					</form>
				</div>
			</div>
		</div>
		<div id="footer">Power by www.jooyea.cn Copyright &copy; 2005-2014</div>
	</div>
</body>
</html>
Beispiel #30
0
<script language="javascript">
//短信和邮箱切换
function changeTab()
{
	$('#mailWay').toggle();
	$('#mobileWay').toggle();
}

//发送短信码
function sendMessage()
{
	var username = $('#mobileWay [name="username"]').val();
	var mobile   = $('#mobileWay [name="mobile"]').val();
	$.get("<?php 
echo IUrl::creatUrl("/simple/send_message_mobile");
?>
",{"username":username,"mobile":mobile},function(content){
		if(content == 'success')
		{
			alert('发送成功,请查看您的手机');
		}
		else
		{
			alert(content);
			return;
		}
	});
}
</script>