当前位置: 首页>>代码示例>>PHP>>正文


PHP dr_url函数代码示例

本文整理汇总了PHP中dr_url函数的典型用法代码示例。如果您正苦于以下问题:PHP dr_url函数的具体用法?PHP dr_url怎么用?PHP dr_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dr_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 /**
  * 2.3.1 更新程序
  */
 public function index()
 {
     $this->admin_msg('升级完成,请更新全站缓存在刷新页面', '', 1);
     if (DR_VERSION_ID != 16) {
         //$this->admin_msg('升级完成,请更新全站缓存在刷新页面', '', 1);
     }
     //
     $page = (int) $this->input->get('page');
     if (!$page) {
         $this->admin_msg('正在升级数据...', dr_url('update/index', array('page' => $page + 1)), 2);
     }
     switch ($page) {
         case 1:
             $data = $this->db->get('site')->result_array();
             if ($data) {
                 $field = $this->db->dbprefix('field');
                 foreach ($data as $t) {
                     $table = $this->db->dbprefix($t['id'] . '_navigator');
                     $this->db->query('ALTER TABLE `' . $table . '` ADD `childids` TEXT NULL DEFAULT NULL AFTER `child`;');
                     $this->db->query('ALTER TABLE `' . $table . '` ADD `pids` TEXT NULL DEFAULT NULL AFTER `pid`;');
                     $this->db->query('ALTER TABLE `' . $table . '` ADD `mark` VARCHAR(50) NOT NULL AFTER `show`;');
                     $this->db->query('ALTER TABLE `' . $table . '` ADD `extend` INT(1) DEFAULT NULL AFTER `mark`;');
                     $this->db->query('ALTER TABLE `' . $table . '` ADD INDEX (`mark`) ;');
                     $this->db->query('ALTER TABLE `' . $table . '` ADD INDEX (`extend`) ;');
                 }
             }
             $this->admin_msg('正在升级网站导航表结构...', dr_url('update/index', array('page' => $page + 1)), 2);
             break;
         default:
             $this->admin_msg('升级完成,请更新全站缓存在刷新页面', '', 1);
             break;
     }
 }
开发者ID:xxjuan,项目名称:php-coffee,代码行数:36,代码来源:Update.php

示例2: index

 /**
  * 菜单管理
  */
 public function index()
 {
     if (IS_POST) {
         $ids = $this->input->post('ids');
         if (!$ids) {
             exit(dr_json(0, lang('013')));
         }
         // 可以不用判断权限
         if ($this->input->post('action') == 'order') {
             $_data = $this->input->post('data');
             foreach ($ids as $id) {
                 $this->db->where('id', $id)->update('admin_menu', array('displayorder' => (int) $_data[$id]['displayorder']));
             }
             $this->menu_model->cache();
             $this->system_log('排序后台菜单项【#' . @implode(',', $ids) . '】');
             // 记录日志
             exit(dr_json(1, lang('339')));
         } else {
             $this->menu_model->delete($ids);
             $this->system_log('删除后台菜单项【#' . @implode(',', $ids) . '】');
             // 记录日志
             $this->menu_model->cache();
             exit(dr_json(1, lang('339')));
         }
     }
     $this->load->library('dtree');
     $this->dtree->icon = array('   │ ', '   ├─ ', '   └─ ');
     $this->dtree->nbsp = '   ';
     $left = $this->menu_model->get_left_id();
     $data = $this->db->order_by('displayorder ASC,id ASC')->get('admin_menu')->result_array();
     $tree = array();
     if ($data) {
         foreach ($data as $t) {
             $t['name'] = '<i class="' . $t['icon'] . '"></i> ' . $t['name'];
             $t['option'] = '';
             if ($this->is_auth('admin/menu/add') && !in_array($t['pid'], $left)) {
                 $t['option'] .= '<a class="add" title="' . lang('add') . '" href="' . dr_dialog_url(dr_url('menu/add', array('pid' => $t['id'])), 'add') . '"></a>&nbsp;&nbsp;';
             } else {
                 $t['option'] .= '<a class="add" style="background:none" href="javascript:;"></a>&nbsp;&nbsp;';
             }
             if ($this->is_auth('admin/menu/edit')) {
                 $t['hidden'] = '<a href="javascript:;" onClick="return dr_dialog_set(\'' . ($t['hidden'] ? lang('html-161') : lang('html-162')) . '\',\'' . dr_url('menu/hidden', array('id' => $t['id'])) . '\');"><img src="/dayrui/statics/images/' . ($t['hidden'] ? 0 : 1) . '.gif"></a>';
             } else {
                 $t['hidden'] = '<img src="/dayrui/statics/images/' . ($t['hidden'] ? 0 : 1) . '.gif">';
             }
             if ($this->is_auth('admin/menu/edit')) {
                 $t['option'] .= '<a class="edit" title="' . lang('edit') . '" href="' . dr_dialog_url(dr_url('menu/edit', array('id' => $t['id'])), 'edit') . '"></a>&nbsp;&nbsp;';
                 $t['name'] = '<a title="' . lang('edit') . '" href="' . dr_dialog_url(dr_url('menu/edit', array('id' => $t['id'])), 'edit') . '">' . $t['name'] . '</a>&nbsp;&nbsp;';
             }
             if ($this->is_auth('admin/menu/del')) {
                 $t['option'] .= '<a class="del" title="' . lang('del') . '" href="javascript:;" onClick="return dr_dialog_del(\'' . lang('015') . '\',\'' . dr_url('menu/del', array('id' => $t['id'])) . '\');"></a>&nbsp;&nbsp;';
             }
             $tree[$t['id']] = $t;
         }
     }
     $str = "<tr>\n\t\t\t\t\t<td align='right'><input name='ids[]' type='checkbox' class='dr_select' value='\$id' />&nbsp;</td>\n\t\t\t\t\t<td align='center'><input class='input-text displayorder' type='text' name='data[\$id][displayorder]' value='\$displayorder' /></td>\n\t\t\t\t\t<td align='center'>\$hidden</td>\n\t\t\t\t\t<td>\$spacer\$name</td>\n\t\t\t\t\t<td align='left'>\$option</td>\n\t\t\t\t</tr>";
     $this->dtree->init($tree);
     $this->template->assign(array('list' => $this->dtree->get_tree(0, $str)));
     $this->template->display('menu_index.html');
 }
开发者ID:Thebeautifullife,项目名称:yichunchengguan,代码行数:63,代码来源:Menu.php

示例3: index

 /**
  * 管理
  */
 public function index()
 {
     if (IS_POST) {
         $ids = $this->input->post('ids');
         if (!$ids) {
             exit(dr_json(0, lang('013')));
         } elseif (!$this->is_auth('admin/poster/del')) {
             exit(dr_json(0, lang('160')));
         }
         $this->link->where_in('id', $ids)->delete($this->table);
         $this->poster_model->delete('sid IN(' . @implode(',', $ids) . ')');
         $this->system_log('删除广告位【#' . @implode(',', $ids) . '】');
         // 记录日志
         $this->cache(1);
         exit(dr_json(1, lang('000')));
     }
     $data = array();
     $page = max(1, (int) $_GET['page']);
     $total = $_GET['total'] ? $_GET['total'] : $this->link->count_all_results($this->table);
     $order = isset($_GET['order']) && strpos($_GET['order'], "undefined") !== 0 ? $_GET['order'] : 'id DESC';
     if ($total) {
         $data = $this->link->order_by($order)->limit(SITE_ADMIN_PAGESIZE, SITE_ADMIN_PAGESIZE * ($page - 1))->get($this->table)->result_array();
     }
     $param = array('total' => $total, 'order' => $order);
     $this->template->assign(array('list' => $data, 'type' => $this->type, 'total' => $param['total'], 'pages' => $this->get_pagination(dr_url('poster/index', $param), $param['total'])));
     $this->template->display('poster_index.html');
 }
开发者ID:Thebeautifullife,项目名称:yichunchengguan,代码行数:30,代码来源:Poster.php

示例4: admin_index

 /**
  * 管理
  */
 protected function admin_index()
 {
     if (IS_POST) {
         if (!$this->is_auth(APP_DIR . '/admin/tag/del')) {
             exit(dr_json(0, lang('160')));
         }
         $id = $this->input->post('ids');
         if ($id) {
             $this->link->where_in('id', $id)->delete($this->tag_model->tablename);
         }
         $this->system_log('删除站点【#' . SITE_ID . '】模块【' . APP_DIR . '】Tag内容【#' . @implode(',', $id) . '】');
         // 记录日志
         exit(dr_json(1, lang('000')));
     }
     // 数据库中分页查询
     $kw = $this->input->get('kw') ? $this->input->get('kw') : '';
     list($data, $param) = $this->tag_model->limit_page($kw, max((int) $this->input->get('page'), 1), (int) $this->input->get('total'));
     // 菜单选择
     if (isset($_GET['kw'])) {
         $this->template->assign('menu', $this->get_menu(array(lang('125') => APP_DIR . '/admin/tag/index/kw/', lang('add') => APP_DIR . '/admin/tag/add_js')));
     } else {
         $this->_menu();
     }
     $this->template->assign(array('mod' => $this->module, 'list' => $data, 'param' => $param, 'pages' => $this->get_pagination(dr_url(APP_DIR . '/tag/index', $param), $param['total'])));
     $this->template->display('tag_index.html');
 }
开发者ID:Thebeautifullife,项目名称:yichunchengguan,代码行数:29,代码来源:D_Tag.php

示例5: _version

 /**
  * 版本检测
  */
 private function _version()
 {
     $id = (int) dr_catcher_data('http://www.omooo.com/index.php?c=sys&m=now');
     if ($id && DR_VERSION_ID < $id) {
         return $this->halt("您的当前版本过低,为了您网站的安全性,请立即升级到官方最新版本,<a style='color:red' href='" . dr_url('upgrade/index') . "'><b>这里升级</b></a>", 0);
     }
 }
开发者ID:xxjuan,项目名称:php-coffee,代码行数:10,代码来源:Check.php

示例6: del

 /**
  * 删除
  */
 public function del()
 {
     $id = (int) $this->input->get('id');
     $this->form_model->del($id);
     $this->system_log('删除网站表单【#' . $id . '】');
     // 记录日志
     $this->admin_msg(lang('000'), dr_url('form/index'), 1);
 }
开发者ID:Thebeautifullife,项目名称:yichunchengguan,代码行数:11,代码来源:Form.php

示例7: del

 /**
  * 删除收货地址
  */
 public function del()
 {
     $id = (int) $this->input->get('id');
     $this->db->where('id', $id)->where('uid', $this->uid)->delete('member_address');
     if (IS_AJAX) {
         exit(dr_json(1, lang('000')));
     }
     $this->member_msg(lang('000'), dr_url('address/index'), 1);
 }
开发者ID:xxjuan,项目名称:php-coffee,代码行数:12,代码来源:Address.php

示例8: execute

 /**
  * 执行
  */
 public function execute()
 {
     $id = (int) $this->input->get('id');
     $data = $this->db->where('id', $id)->limit(1)->get('cron_queue')->row_array();
     if (!$data) {
         $this->admin_msg(lang('019'));
     }
     $this->cron_model->execute($data);
     $this->admin_msg(lang('000'), dr_url('cron/index'), 1);
 }
开发者ID:xxjuan,项目名称:php-coffee,代码行数:13,代码来源:Cron.php

示例9: edit

 /**
  * 修改
  */
 public function edit()
 {
     $id = (int) $this->input->get('id');
     $data = $this->db->where('id', $id)->limit(1)->get('urlrule')->row_array();
     if (!$data) {
         $this->admin_msg(lang('019'));
     }
     if (IS_POST) {
         $this->db->where('id', $id)->update('urlrule', array('name' => $this->input->post('name'), 'value' => dr_array2string($this->input->post('data'))));
         $this->cache(1);
         $this->admin_msg(lang('000'), dr_url('urlrule/index'), 1);
     }
     $data['value'] = dr_string2array($data['value']);
     $this->template->assign(array('data' => $data));
     $this->template->display('urlrule_add.html');
 }
开发者ID:surgeon-xie,项目名称:jxseo,代码行数:19,代码来源:Urlrule.php

示例10: index

 /**
  * 我的订单
  */
 public function index()
 {
     if (IS_POST && $this->input->post('action')) {
         $ids = $this->input->post('ids', TRUE);
         if (!$ids) {
             exit(dr_json(0, lang('013')));
         }
         if ($this->input->post('action') == 'del') {
             if (!$this->is_auth(APP_DIR . 'admin/format/del')) {
                 exit(dr_json(0, lang('160')));
             }
             $this->link->where_in('id', $ids)->delete($this->order_model->tablename);
             $this->link->where_in('fid', $ids)->delete($this->order_model->dataname);
             $this->order_model->cache();
             exit(dr_json(1, lang('000')));
         } else {
             if (!$this->is_auth(APP_DIR . 'admin/format/edit')) {
                 exit(dr_json(0, lang('160')));
             }
             $_data = $this->input->post('data');
             foreach ($ids as $id) {
                 $this->link->where('id', $id)->update($this->order_model->tablename, $_data[$id]);
             }
             $this->order_model->cache();
             exit(dr_json(1, lang('000')));
         }
     } else {
         // 执行关闭过期订单操作
         $this->order_model->close_order();
     }
     // 根据参数筛选结果
     $param = array();
     if ($this->input->get('search')) {
         $param['search'] = 1;
     }
     // 数据库中分页查询
     list($data, $param) = $this->order_model->limit_page($param, max((int) $this->input->get('page'), 1), (int) $this->input->get('total'));
     if ($this->input->get('search')) {
         $_param = $this->cache->file->get($this->order_model->cache_file);
     } else {
         $_param = $this->input->post('data');
     }
     $_param = $_param ? $param + $_param : $param;
     $this->template->assign(array('list' => $data, 'pages' => $this->get_pagination(dr_url(APP_DIR . '/order/index', $param), $param['total']), 'param' => $_param, 'menu' => $this->get_menu(array(lang('my-31') => APP_DIR . '/admin/order/index')), 'paytype' => $this->order_model->get_pay_type()));
     $this->template->display('order_index.html');
 }
开发者ID:xxjuan,项目名称:php-coffee,代码行数:49,代码来源:Order.php

示例11: index

 /**
  * 首页
  */
 public function index()
 {
     $uid = (int) $this->input->get('uid');
     // 根据参数筛选结果
     $param = array('uid' => $uid, 'type' => 0);
     if ($this->input->get('search')) {
         $param['search'] = 1;
     }
     // 数据库中分页查询
     list($data, $param) = $this->score_model->limit_page($param, max((int) $this->input->get('page'), 1), (int) $this->input->get('total'));
     $param['uid'] = $uid;
     if ($this->input->get('search')) {
         $_param = $this->cache->file->get($this->score_model->cache_file);
     } else {
         $_param = $this->input->post('data');
     }
     $_param = $_param ? $param + $_param : $param;
     $this->template->assign(array('list' => $data, 'name' => SITE_EXPERIENCE, 'param' => $_param, 'pages' => $this->get_pagination(dr_url('member/experience/index', $param), $param['total'])));
     $this->template->display('score_index.html');
 }
开发者ID:xxjuan,项目名称:php-coffee,代码行数:23,代码来源:Experience.php

示例12: index

 /**
  * 空间资料
  */
 public function index()
 {
     $error = NULL;
     $field = array();
     $MEMBER = $this->get_cache('member');
     $field[] = $MEMBER['spacefield']['name'];
     if ($MEMBER['spacefield'] && $MEMBER['group'][$this->member['groupid']]['spacefield']) {
         foreach ($MEMBER['spacefield'] as $t) {
             if (in_array($t['fieldname'], $MEMBER['group'][$this->member['groupid']]['spacefield'])) {
                 $field[] = $t;
             }
         }
     }
     define('IS_SPACE_THEME', $this->space['style'] ? $this->space['style'] : 'default');
     if (IS_POST) {
         $post = $this->validate_filter($field, $this->space);
         if (isset($post['error'])) {
             $data = $this->input->post('data', TRUE);
             $error = $post['msg'];
         } else {
             $error = $this->space_model->update($this->uid, $this->member['groupid'], $post[1]);
             if ($error) {
                 $this->attachment_handle($this->uid, $this->db->dbprefix('space') . '-' . $this->uid, $field, $this->space);
             }
             if ($error == 0) {
                 // 名称重复
                 $error = lang('m-239');
             } elseif ($error == 1) {
                 // 操作成功
                 $this->member_msg(lang('000'), dr_url('space/index'), 1);
             } else {
                 // 操作成功,等待审核
                 $this->member_msg(lang('m-240'), dr_url('space/index'), 2);
             }
         }
     } else {
         $data = $this->space;
     }
     $this->template->assign(array('data' => $data, 'field' => $field, 'myfield' => $this->field_input($field, $data, FALSE, 'uid'), 'newspace' => $this->space ? 0 : 1, 'result_error' => $error));
     $this->template->display('space_index.html');
 }
开发者ID:Thebeautifullife,项目名称:yichunchengguan,代码行数:44,代码来源:Space.php

示例13: convert

 /**
  * 虚拟卡兑换
  */
 public function convert()
 {
     $error = '';
     if (IS_POST) {
         $score = abs((int) $this->input->post('score'));
         $money = (double) $score / SITE_CONVERT;
         if (!$score) {
             $error = lang('m-227');
         } elseif ($money > $this->member['money']) {
             $error = lang('m-210');
         } else {
             // 虚拟币增加
             $this->member_model->update_score(1, $this->uid, $score, '', 'lang,m-226');
             // 人民币减少
             $this->pay_model->add($this->uid, -$money, 'lang,m-228,' . $score);
             $this->member_msg(lang('m-225'), dr_url('pay/score'), 1);
         }
     }
     $this->template->assign(array('result_error' => $error));
     $this->template->display('pay_convert.html');
 }
开发者ID:Thebeautifullife,项目名称:yichunchengguan,代码行数:24,代码来源:Pay.php

示例14: oplog

 /**
  * 系统操作日志
  */
 public function oplog()
 {
     $time = isset($_POST['data']['time']) && $_POST['data']['time'] ? (int) $_POST['data']['time'] : (int) $this->input->get('time');
     $time = $time ? $time : SYS_TIME;
     $file = FCPATH . 'cache/optionlog/' . date('Ym', $time) . '/' . date('d', $time) . '.log';
     $list = array();
     $data = @explode(PHP_EOL, file_get_contents($file));
     $data = @array_reverse($data);
     $page = max(1, (int) $this->input->get('page'));
     $total = count($data);
     $limit = ($page - 1) * SITE_ADMIN_PAGESIZE;
     $i = $j = 0;
     foreach ($data as $v) {
         if ($v && $i >= $limit && $j < SITE_ADMIN_PAGESIZE) {
             $list[] = $v;
             $j++;
         }
         $i++;
     }
     $this->template->assign(array('time' => $time, 'list' => $list, 'total' => $total, 'pages' => $this->get_pagination(dr_url('system/oplog', array('time' => $time)), $total)));
     $this->template->display('system_oplog.html');
 }
开发者ID:surgeon-xie,项目名称:jxseo,代码行数:25,代码来源:System.php

示例15: url

 /**
  * 更新URL
  */
 public function url()
 {
     $cfile = SITE_ID . APP_DIR . $this->uid . $this->input->ip_address() . '_content_url';
     if (IS_POST) {
         $catid = $this->input->post('catid');
         $query = $this->link;
         if (count($catid) > 1 || $catid[0]) {
             $query->where_in('catid', $catid);
             if (count($this->get_cache('module-' . SITE_ID . '-' . APP_DIR, 'category')) == count($catid)) {
                 $catid = 0;
             }
         } else {
             $catid = 0;
         }
         // 统计数量
         $total = $query->count_all_results($this->content_model->prefix . '_index');
         $this->cache->file->save($cfile, array('catid' => $catid, 'total' => $total), 10000);
         if ($total) {
             $this->mini_msg(dr_lang('132', $total), dr_url(APP_DIR . '/home/url', array('todo' => 1)), 2);
         } else {
             $this->mini_msg(lang('133'));
         }
     }
     // 处理url
     if ($this->input->get('todo')) {
         $page = max(1, (int) $this->input->get('page'));
         $psize = 100;
         // 每页处理的数量
         $cache = $this->cache->file->get($cfile);
         if ($cache) {
             $total = $cache['total'];
             $catid = $cache['catid'];
         } else {
             $catid = 0;
             $total = $this->link->count_all_results($this->content_model->prefix);
         }
         $tpage = ceil($total / $psize);
         // 总页数
         if ($page > $tpage) {
             // 更新完成删除缓存
             $this->cache->file->delete($cfile);
             $this->mini_msg(lang('360'), NULL, 1);
         }
         $module = $this->get_cache('module-' . SITE_ID . '-' . APP_DIR);
         $table = $this->content_model->prefix;
         if ($catid) {
             $this->link->where_in('catid', $catid);
         }
         $data = $this->link->limit($psize, $psize * ($page - 1))->order_by('id DESC')->get($table)->result_array();
         foreach ($data as $t) {
             $url = dr_show_url($module, $t);
             $this->link->update($table, array('url' => $url), 'id=' . $t['id']);
             if ($module['extend']) {
                 $extend = $this->link->where('cid', (int) $t['id'])->order_by('id DESC')->get($table . '_extend')->result_array();
                 if ($extend) {
                     foreach ($extend as $e) {
                         $this->link->where('id=', (int) $e['id'])->update($table . '_extend', array('url' => dr_extend_url($module, $e)));
                     }
                 }
             }
         }
         $this->mini_msg(dr_lang('135', "{$tpage}/{$page}"), dr_url(APP_DIR . '/home/url', array('todo' => 1, 'page' => $page + 1)), 2, 0);
     } else {
         $this->template->assign(array('menu' => $this->get_menu($this->_get_content_menu()), 'select' => $this->select_category($this->get_cache('module-' . SITE_ID . '-' . APP_DIR, 'category'), 0, 'id="dr_synid" name=\'catid[]\' multiple style="width:200px;height:250px;"', '')));
         $this->template->display('content_url.html');
     }
 }
开发者ID:surgeon-xie,项目名称:jxseo,代码行数:70,代码来源:D_Admin_Home.php


注:本文中的dr_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。