protected final function CheckAdminInfo($uid = null, $ashell = null) { $this->db = System::load_app_model('admin_model', G_ADMIN_DIR); if ($uid && $ashell) { $CheckId = _encrypt($uid, 'DECODE'); $CheckAshell = _encrypt($ashell, 'DECODE'); } else { $CheckId = _encrypt(_getcookie("AID"), 'DECODE'); $CheckAshell = _encrypt(_getcookie("ASHELL"), 'DECODE'); } if (!$CheckId || !$CheckAshell) { return false; } $info = $this->db->GetOne("SELECT * FROM `@#_admin` WHERE `uid` = '{$CheckId}'"); if (isset($_POST['dosubmit']) || isset($_POST['submit-1'])) { if ($info[mid] == '1') { _message("测试帐号无修改权限!"); } } if (!$info) { return false; } $infoshell = md5($info['username'] . $info['userpass']) . md5($_SERVER['HTTP_USER_AGENT']); if ($infoshell != $CheckAshell) { return false; } $this->AdminInfo = $info; return true; }
protected final function CheckAdminInfo($uid = null, $ashell = null) { $this->db = System::load_app_model('admin_model', G_ADMIN_DIR); if ($uid && $ashell) { $CheckId = _encrypt($uid, 'DECODE'); $CheckAshell = _encrypt($ashell, 'DECODE'); } else { $CheckId = _encrypt(_getcookie("AID"), 'DECODE'); $CheckAshell = _encrypt(_getcookie("ASHELL"), 'DECODE'); } if (!$CheckId || !$CheckAshell) { return false; } $info = $this->db->GetOne("SELECT * FROM `@#_admin` WHERE `uid` = '{$CheckId}'"); if (!$info) { return false; } $infoshell = md5($info['username'] . $info['userpass']) . md5($_SERVER['HTTP_USER_AGENT']); if ($infoshell != $CheckAshell) { return false; } if (empty($_SESSION['token']) && $_SESSION['token'] != md5($info['username'] . $info['userpass'])) { return false; } $this->AdminInfo = $info; return true; }
protected final function DB($model = 'model', $module = 'sys') { static $classes = array(); if (isset($classes[$model . $module])) { return $classes[$model . $module]; } if ($module == 'sys') { return $classes[$model . $module] = System::load_sys_class($model); } else { return $classes[$model . $module] = System::load_app_model($model, $module); } }
static final function StaticCheckAdminInfo($uid = null, $ashell = null) { $db = System::load_app_model('admin_model', G_ADMIN_DIR); if ($uid && $ashell) { $CheckId = _encrypt($uid, 'DECODE'); $CheckAshell = _encrypt($ashell, 'DECODE'); } else { $CheckId = _encrypt(_getcookie("AID"), 'DECODE'); $CheckAshell = _encrypt(_getcookie("ASHELL"), 'DECODE'); } if (!$CheckId || !$CheckAshell) { return false; } $info = $db->GetOne("SELECT * FROM `@#_admin` WHERE `uid` = '{$CheckId}'"); if (!$info) { return false; } $infoshell = md5($info['username'] . $info['userpass']) . md5($_SERVER['HTTP_USER_AGENT']); if ($infoshell != $CheckAshell) { return false; } return $info; }
public function article_edit() { $id = intval($this->segment(4)); $info = $this->db->GetOne("SELECT * FROM `@#_article` where `id`='{$id}' LIMIT 1"); if (isset($_POST['dosubmit'])) { $cateid = intval($_POST['cateid']); $title = htmlspecialchars($_POST['title']); $title_color = htmlspecialchars($_POST['title_style_color']); $title_bold = htmlspecialchars($_POST['title_style_bold']); $title_style = ''; if ($title_color) { $title_style .= 'color:' . $title_color . ';'; } if ($title_bold) { $title_style .= 'font-weight:' . $title_bold . ';'; } $keywords = htmlspecialchars($_POST['keywords']); $description = htmlspecialchars($_POST['description']); $content = editor_safe_replace(stripslashes($_POST['content'])); $author = isset($_POST['zuoze']) ? htmlspecialchars($_POST['zuoze']) : ''; $thumb = isset($_POST['thumb']) ? htmlspecialchars($_POST['thumb']) : ''; $picarr = isset($_POST['uppicarr']) ? serialize($_POST['uppicarr']) : serialize(array()); $posttime = strtotime($_POST['posttime']) ? strtotime($_POST['posttime']) : time(); $hit = intval($_POST['hit']); $position_arr = isset($_POST['position']) ? $_POST['position'] : false; if (empty($title)) { _message("标题不能为空"); } if (!$cateid) { _message("栏目不能为空"); } $sql = "UPDATE `@#_article` SET `cateid`='{$cateid}', \r\n\t\t\t\t\t\t\t\t\t\t `author`='{$author}', \r\n\t\t\t\t\t\t\t\t\t\t `title`='{$title}',\r\n\t\t\t\t\t\t\t\t\t\t `title_style` = '{$title_style}', \r\n\t\t\t\t\t\t\t\t\t\t `keywords`='{$keywords}', \r\n\t\t\t\t\t\t\t\t\t\t `description`='{$description}',\r\n\t\t\t\t\t\t\t\t\t\t `thumb`='{$thumb}',\r\n\t\t\t\t\t\t\t\t\t\t `picarr`='{$picarr}',\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t `content`='{$content}', \r\n\t\t\t\t\t\t\t\t\t\t `posttime`='{$posttime}',\r\n\t\t\t\t\t\t\t\t\t\t `hit` = '{$hit}'\r\n\t\t\t\t\t\t\t\t\t\t WHERE (`id`='{$id}')"; $this->db->Query($sql); if ($position_arr) { $posinfo = array(); $posinfo['id'] = $info['id']; $posinfo['title'] = $title; $posinfo['title_style'] = $title_style; $posinfo['thumb'] = $thumb; $position = System::load_app_model("position", 'api'); $position->pos_insert($position_arr, $posinfo); } if ($this->db->affected_rows()) { _message("修改成功!", WEB_PATH . '/' . ROUTE_M . '/content/article_list/'); } else { _message("修改失败!"); } header("Cache-control: private"); } if (!$info) { _message("参数错误"); } $cateinfo = $this->db->GetOne("SELECT * FROM `@#_category` WHERE `cateid` = '{$info['cateid']}' LIMIT 1"); $categorys = $this->categorys; $tree = System::load_sys_class('tree'); $tree->icon = array('│ ', '├─ ', '└─ '); $tree->nbsp = ' '; $categoryshtml = "<option value='\$cateid'>\$spacer\$name</option>"; $tree->init($categorys); $categoryshtml = $tree->get_tree(0, $categoryshtml); $categoryshtml .= '<option value="' . $cateinfo['cateid'] . '" selected="true">' . $cateinfo['name'] . '</option>'; $this->ment = array(array("lists", "内容管理", ROUTE_M . '/' . ROUTE_C . "/article_list"), array("insert", "添加文章", ROUTE_M . '/' . ROUTE_C . "/article_add")); $info['picarr'] = unserialize($info['picarr']); $info['posttime'] = date("Y-m-d H:i:s", $info['posttime']); if ($info['title_style']) { if (stripos($info['title_style'], "font-weight:") !== false) { $title_bold = 'bold'; } else { $title_bold = ''; } if (stripos($info['title_style'], "color:") !== false) { $title_color = explode(';', $info['title_style']); $title_color = explode(':', $title_color[0]); $title_color = $title_color[1]; } else { $title_color = ''; } } else { $title_color = ''; $title_bold = ''; } include $this->tpl(ROUTE_M, 'article.edit'); }
public function __construct() { parent::__construct(); $this->db = System::load_app_model('admin_model'); }
</div> <div class="honesty"> <ul> <li><a href="http://www.gd1yyg.com/single/renzheng" target="_blank" title="诚信网站"><i class="i1"></i>诚信网站</a></li> <li><a href="http://www.gd1yyg.com/single/renzheng" target="_blank" rel="nofollow" title="可信网站"><i class="i2"></i>可信网站</a></li> <li><a href="http://www.gd1yyg.com/single/renzheng" target="_blank" rel="nofollow" title="电商诚信"><i class="i3"></i>电商诚信</a></li> <li><a href="http://www.gd1yyg.com/single/renzheng" target="_blank" rel="nofollow" title="安信宝"><i class="i4"></i>安信宝</a></li> <li><a href="http://www.gd1yyg.com/single/renzheng" target="_blank" rel="nofollow" title="监督管理局"><i class="i5"></i>监督管理局</a></li> <li><a href="http://www.gd1yyg.com/single/renzheng" target="_blank" rel="nofollow" title="更多"><i class="i6"></i>更多</a></li> </ul> </div> <div class="index_news"> <dl> <dt>新闻公告</dt> <?php $mod_group_group = System::load_app_model('group', 'group'); $datas = $mod_group_group->get_group_tiezi(3); ?> <?php $ln = 1; if (is_array($datas)) { foreach ($datas as $row) { ?> <dd><b></b><a href="<?php echo WEB_PATH; ?> /group/nei/<?php echo $row['id'];
public function __construct() { parent::__construct(); $this->db = System::load_app_model('admin_model'); $this->ment = array(array("lists", "商品列表", ROUTE_M . "/content/goods_list")); }
} $(function () { setInterval('autoScroll(".Newest_Con")', 3000) }) </script> </div> <!--我的云购记录--> <div class="My_Record hide" style="display:none;"> <?php if (get_user_uid()) { ?> <ul> <?php $mod_member_member = System::load_app_model('member', 'member'); $datas = $mod_member_member->get_record(get_user_uid(), $item['id'], 9); ?> <?php if (!$datas) { ?> <div class="my-record"> <div class="null-mytips-wrapper clearfix"> <div class="gth-icon transparent-png"></div> <span class="my-text" style="color: #bbb; font-size: 14px; line-height: 42px; padding-left: 8px; padding-top: 160px;">您还没有参与本雨商品哦!</span> </div> </div>
?> 网预先注入启动资金 )</dl> <p><b id="pFundMoney"><?php echo $fund_data['fund_count_money']; ?> </b><span>元</span></p> </div> <dl><img src="<?php echo G_TEMPLATES_STYLE; ?> /images/welfare_15.gif" alt=""></dl> <div class="fCon"> <div class="funding" id="divFundList"> <!--最新闪购记录--> <?php $mod_member_record = System::load_app_model('record', 'member'); $datas = $mod_member_record->get_new_record(10); ?> <?php $ln = 1; if (is_array($datas)) { foreach ($datas as $row) { ?> <ul> <li><a href="<?php echo WEB_PATH; ?> /uname/<?php echo $row['uid'] + 1000000000;