public function tag() { $search = $this->segment_array(); array_shift($search); array_shift($search); array_shift($search); $search = implode('/', $search); if (!$search) { _message("输入搜索关键字"); } $search = urldecode($search); $search = safe_replace($search); if (!_is_utf8($search)) { $search = iconv("GBK", "UTF-8", $search); } $mysql_model = System::load_sys_class('model'); $search = str_ireplace("union", '', $search); $search = str_ireplace("select", '', $search); $search = str_ireplace("delete", '', $search); $search = str_ireplace("update", '', $search); $search = str_ireplace("/**/", '', $search); $title = $search . ' - ' . _cfg('web_name'); $shoplist = $mysql_model->GetList("select title,thumb,id,sid,zongrenshu,canyurenshu,shenyurenshu,money from `@#_shoplist` WHERE shenyurenshu !=0 and `title` LIKE '%" . $search . "%' order by shenyurenshu desc"); $list = count($shoplist); include templates("search", "search"); }
public function buyrecordbai() { $this->db = System::load_sys_class("model"); $res = $this->db->GetOne("select sum(gonumber) gonumber from `@#_member_go_record`"); $this->db->query("update `@#_caches` set value='{$res['gonumber']}' where `key`='goods_count_num'"); $RecordList = $this->db->GetList("select username,uid,shopid,shopname,shopqishu,gonumber,time from `@#_member_go_record` where 1 order by id desc limit 0,100"); include templates("index", "buyrecordbai"); }
public function init() { $mysql_model = System::load_sys_class('model'); $title = "友情链接"; $link_size = $mysql_model->GetList("select * from `@#_link` where `type`='1'"); $link_img = $mysql_model->GetList("select * from `@#_link` where `type`='2'"); include templates("link", "link"); }
public function userpost() { $mysql_model = System::load_sys_class('model'); $title = "获得的商品"; $index = intval($this->segment(4)) - 1000000000; $tab = $this->segment(3); $member = $mysql_model->GetOne("select * from `@#_member` where uid='" . $index . "'"); if ($member) { include templates("us", "userpost"); } else { _message("页面错误", WEB_PATH, 3); } }
public function userpost() { $mysql_model = System::load_sys_class('model'); $title = "晒单"; $index = $this->uid; $tab = $this->segment(3); $member = $mysql_model->GetOne("select * from `@#_member` where uid='{$index}'"); $membershaidan = $mysql_model->GetList("select * from `@#_shaidan` where sd_userid='{$index}' order by `sd_id` DESC limit 0,10"); if ($member) { include templates("us", "userpost"); } else { _message("页面错误", WEB_PATH, 3); } }
public function next() { $webname = $this->_cfg['web_name']; //header("location: ".WEB_PATH); System::load_sys_fun('user'); $w_minri_time = strtotime(date('Y-m-d', strtotime("+1 day"))); $w_hinri_time = strtotime(date('Y-m-d', strtotime("+2 day"))); $shoplist = $this->db->GetList("select * from `@#_shoplist` where `xsjx_time` > '{$w_minri_time}' and `xsjx_time` < '{$w_hinri_time}' order by `xsjx_time` limit 0,3"); $count = count($shoplist); $titlets = '抱歉,明日还没有发布限时揭晓商品!'; $date = 'next'; $key = "限时"; include templates("mobile/index", "autolottery"); }
function build() { $kav = new Kav4Proxy(); $conf = $kav->build_config(); echo "Starting......: " . date("H:i:s") . " Kav4proxy building configuration done\n"; @file_put_contents("/etc/opt/kaspersky/kav4proxy.conf", $conf); shell_exec("/bin/chown -R kluser /etc/opt/kaspersky"); shell_exec("/bin/chown -R kluser /var/log/kaspersky/kav4proxy"); @mkdir("/tmp/Kav4proxy", 0777); @chmod("/tmp/Kav4proxy", 0777); @chown("/tmp/Kav4Proxy", "kluser"); @chgrp("/tmp/Kav4Proxy", "kluser"); templates(); }
public function userraffle() { $mysql_model = System::load_sys_class('model'); $title = "获得的商品"; $index = $this->uid; $tab = $this->segment(3); $member = $mysql_model->GetOne("select * from `@#_member` where uid='{$index}'"); $memberhuode = $mysql_model->GetList("select * from `@#_member_go_record` where uid='{$index}' and `huode` > '10000000' order by `id` DESC limit 0,10"); if ($member) { include templates("us", "userraffle"); } else { _message("页面错误", WEB_PATH, 3); } }
public function init() { //header("location: ".WEB_PATH); System::load_sys_fun('user'); $title = "限时揭晓" . "_" . $this->_cfg["web_name"]; $jinri_time = abs(date("m")) . '月' . date("d") . "日"; $minri_time = abs(date("m", strtotime("+1 day"))) . '月' . date("d", strtotime("+1 day")) . "日"; $w_jinri_time = strtotime(date('Y-m-d')); $w_minri_time = strtotime(date('Y-m-d', strtotime("+1 day"))); $w_hinri_time = strtotime(date('Y-m-d', strtotime("+2 day"))); $jinri_shoplist = $this->db->GetList("select * from `@#_shoplist` where `xsjx_time` > '{$w_jinri_time}' and `xsjx_time` < '{$w_minri_time}' order by id DESC limit 0,3"); $minri_shoplist = $this->db->GetList("select * from `@#_shoplist` where `xsjx_time` > '{$w_minri_time}' and `xsjx_time` < '{$w_hinri_time}' order by id DESC limit 0,3"); //往期回顾 $endshoplist = $this->db->GetList("select * from `@#_shoplist` where `xsjx_time` != '0' and `q_uid` != '0' order by `xsjx_time` DESC limit 0,8"); include templates("index", "autolottery"); }
public function init() { $lists = $this->db->GetList("SELECT * FROM `@#_qqset` where 1"); $lists1 = array(); $lists2 = array(); $title = "官方QQ群" . _cfg("web_name"); if (!empty($lists)) { foreach ($lists as $key => $val) { if ($val['type'] == '地方群') { $lists1[$key] = $val; } else { $lists2[$key] = $val; } } } include templates("index", "qq"); }
public function detail() { $webname = $this->_cfg['web_name']; $key = "晒单分享"; $member = $this->userinfo; $sd_id = intval($this->segment(4)); $shaidan = $this->db->GetOne("select * from `@#_shaidan` where `sd_id`='{$sd_id}'"); $goods = $this->db->GetOne("select * from `@#_shoplist` where `sid` = '{$shaidan['sd_shopid']}' order by `qishu` DESC"); $shaidannew = $this->db->GetList("select * from `@#_shaidan` order by `sd_id` DESC limit 5"); $shaidan_hueifu = $this->db->GetList("select * from `@#_shaidan_hueifu` where `sdhf_id`='{$sd_id}'"); if (!$shaidan) { //_message("页面错误"); echo "页面错误"; } $substr = substr($shaidan['sd_photolist'], 0, -1); $sd_photolist = explode(";", $substr); include templates("mobile/index", "detail"); }
public function go_record_ifram() { $gid = (int) $this->segment(4); $len = (int) $this->segment(5); if ($len < 10) { $len = 10; } $page = System::load_sys_class('page'); $total = $this->db->GetCount("SELECT * FROM `@#_member_go_record` WHERE `shopid` = '{$gid}'"); if (isset($_GET['p'])) { $pagenum = (int) $_GET['p']; } else { $pagenum = 1; } $num = $len; $page->config($total, $num, $pagenum, "0"); $go_record_list = $this->db->GetPage("SELECT * FROM `@#_member_go_record` WHERE `shopid` = '{$gid}' order by id DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0)); include templates("index", "go_record_ifram"); }
public function single() { $single = $this->segment(4); if (intval($single)) { $article = $this->db->GetOne("SELECT * FROM `@#_category` where `cateid` = '{$single}' LIMIT 1"); } else { $article = $this->db->GetOne("SELECT * FROM `@#_category` where `catdir` = '{$single}' LIMIT 1"); } if (!$article) { _message("参数错误!"); } $info = unserialize($article['info']); $article['thumb'] = $info['thumb']; $article['des'] = $info['des']; $article['content'] = base64_decode($info['content']); $title = empty($info['meta_title']) ? $article['name'] : $info['meta_title']; $keywords = $info['meta_keywords']; $description = $info['meta_description']; $template = explode('.', $info['template']); include templates($template[0], $template[1]); }
?> <?php if (defined('G_IN_ADMIN')) { echo '<div style="padding:8px;background-color:#F93; color:#fff;border:1px solid #f60;text-align:center"><b>This Tag</b></div>'; } ?> </div> </div> </section> <?php include templates("mobile/index", "footer"); ?> <script language="javascript" type="text/javascript"> var Path = new Object(); Path.Skin="<?php echo G_WEB_PATH; ?> /statics/templates/yungou"; Path.Webpath = "<?php echo WEB_PATH; ?> "; var Base={head:document.getElementsByTagName("head")[0]||document.documentElement,Myload:function(B,A){this.done=false;B.onload=B.onreadystatechange=function(){if(!this.done&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){this.done=true;A();B.onload=B.onreadystatechange=null;if(this.head&&B.parentNode){this.head.removeChild(B)}}}},getScript:function(A,C){var B=function(){};if(C!=undefined){B=C}var D=document.createElement("script");D.setAttribute("language","javascript");D.setAttribute("type","text/javascript");D.setAttribute("src",A);this.head.appendChild(D);this.Myload(D,B)},getStyle:function(A,B){var B=function(){};if(callBack!=undefined){B=callBack}var C=document.createElement("link");C.setAttribute("type","text/css");C.setAttribute("rel","stylesheet");C.setAttribute("href",A);this.head.appendChild(C);this.Myload(C,B)}} function GetVerNum(){var D=new Date();return D.getFullYear().toString().substring(2,4)+'.'+(D.getMonth()+1)+'.'+D.getDate()+'.'+D.getHours()+'.'+(D.getMinutes()<10?'0':D.getMinutes().toString().substring(0,1))} Base.getScript('<?php
public function findok() { $key = $this->segment(4); if (empty($key)) { _message("未知错误"); } else { $key = $this->segment(4); } $checkcode = explode("|", _encrypt($key, "DECODE")); if (count($checkcode) != 3) { _message("未知错误", NULL, 3); } $emailurl = explode("@", $checkcode[0]); if ($emailurl[1]) { $sql = "select * from `@#_member` where `email`='{$checkcode['0']}' AND `passcode`= '{$checkcode['1']}|{$checkcode['2']}' LIMIT 1"; } else { $sql = "select * from `@#_member` where `mobile`='{$checkcode['0']}' AND `passcode`= '{$checkcode['1']}|{$checkcode['2']}' LIMIT 1"; } $member = $this->DB()->GetOne($sql); if (!$member) { _message("帐号或验证码错误", NULL, 2); } $usercheck = explode("|", $member['passcode']); $timec = time() - $usercheck[1]; if ($timec < 3600 * 24) { $title = "重置密码"; include templates("user", "findok"); } else { $title = "验证失败"; include templates("user", "finderror"); } }
public function itmeifram() { $itemid = safe_replace($this->segment(4)); $item = $this->db->GetOne("select id,sid,qishu from `@#_shoplist` where `id`='{$itemid}' LIMIT 1"); if (!$item) { $error = 1; } else { $error = 0; $page = System::load_sys_class('page'); $total = $this->db->GetCount("select id from `@#_shaidan` where `sd_shopsid`='{$item['sid']}'"); if (!$total) { $error = 1; } if (isset($_GET['p'])) { $pagenum = $_GET['p']; } else { $pagenum = 1; } $num = 10; $page->config($total, $num, $pagenum, "0"); $shaidan = $this->db->GetPage("select * from `@#_shaidan` where `sd_shopsid` = '{$item['sid']}' order by sd_id DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0)); foreach ($shaidan as $key => $val) { $member_info = $this->db->GetOne("select * from `@#_member` where `uid`='{$val['sd_userid']}'"); $member_img[$val['sd_id']] = $member_info['img']; $member_id[$val['sd_id']] = $member_info['uid']; $member_username[$val['sd_id']] = $member_info['username']; } } include templates("index", "itemifram"); }
case 'export': template_export(); break; case 'import': include_once './include/top_header.php'; import(); include_once './include/bottom_footer.php'; break; case 'edit': include_once './include/top_header.php'; template_edit(); include_once './include/bottom_footer.php'; break; default: include_once './include/top_header.php'; templates(); include_once './include/bottom_footer.php'; break; } function template_export() { $output = "<templates>\n"; if (sizeof($_POST)) { foreach ($_POST as $t => $v) { if (substr($t, 0, 4) == 'chk_') { $id = substr($t, 4); if (is_numeric($id)) { $data = db_fetch_row("SELECT * FROM thold_template WHERE id={$id}"); if (sizeof($data)) { $data_template_hash = db_fetch_cell("SELECT hash \r\n\t\t\t\t\t\tFROM data_template \r\n\t\t\t\t\t\tWHERE id=" . $data["data_template_id"]); $data_source_hash = db_fetch_cell("SELECT hash \r\n\t\t\t\t\t\tFROM data_template_rrd \r\n\t\t\t\t\t\tWHERE id=" . $data["data_source_id"]);
public function jf_paysuccess() { $_COOKIE['Cartlist_jf'] = NULL; _setcookie("Cartlist_jf", null); include templates("cart", "jf_paysuccess"); }
<span class="u-results-visitors">1</span> <span class="u-results-code"><em><a href="http://member.1yyg.com/UserBuyDetail-2505081.do" target="_blank">查看所有云购码</a></em> </span> </dd> <?php } } $ln++; unset($ln); ?> </dl> </div> <div class="g-results-loading" style="display: none;"> <span>正在提交数据,请稍候……</span> <b></b> </div> <div id="divWx" class="g-wx-banner" style=""> <img alt="" src="http://www.gd1yyg.com/statics/plugin/style/global/image/wx-banner.jpg"> </div> </div> </div> <!--footer 开始--> <?php include templates("index", "footercart");
function edit() { global $colors, $tabs_thold, $config; /* ================= input validation ================= */ input_validate_input_number(get_request_var_request("id")); /* ==================================================== */ /* set the default tab */ load_current_session_value("tab", "sess_thold_notify_tab", "general"); $current_tab = $_REQUEST["tab"]; if (sizeof($tabs_thold) && isset($_REQUEST['id'])) { /* draw the tabs */ print "<table class='tabs' width='100%' cellspacing='0' cellpadding='3' align='center'><tr>\n"; foreach (array_keys($tabs_thold) as $tab_short_name) { print "<td style='padding:3px 10px 2px 5px;background-color:" . ($tab_short_name == $current_tab ? "silver;" : "#DFDFDF;") . "white-space:nowrap;'" . " width='1%' " . " align='center' class='tab'>\n\t\t\t\t<span class='textHeader'><a href='" . htmlspecialchars($config['url_path'] . "plugins/thold/notify_lists.php?action=edit&id=" . get_request_var_request('id') . "&tab=" . $tab_short_name) . "'>{$tabs_thold[$tab_short_name]}</a></span>\n\t\t\t\t</td>\n\n\t\t\t\t<td width='1'></td>\n"; } print "<td></td>\n</tr></table>\n"; } $header_label = get_notification_header_label(); if (isset($_REQUEST['id'])) { $list = db_fetch_row('SELECT * FROM plugin_notification_lists WHERE id=' . $_REQUEST['id']); } else { $list = array(); $current_tab = 'general'; } if ($current_tab == "general") { html_start_box("<strong>General Settings</strong> " . htmlspecialchars($header_label), "100%", $colors["header"], "3", "center", ""); $fields_notification = array("name" => array("method" => "textbox", "friendly_name" => "Name", "description" => "Enter a name for this Notification List", "value" => "|arg1:name|", "max_length" => "80"), "description" => array("method" => "textarea", "friendly_name" => "Description", "description" => "Enter a description for this Notification List", "value" => "|arg1:description|", "class" => "textAreaNotes", "textarea_rows" => "2", "textarea_cols" => "80"), "emails" => array("method" => "textarea", "friendly_name" => "Email Addresses", "description" => "Enter a comma separated list of Email addresses for this notification list.", "value" => "|arg1:emails|", "class" => "textAreaNotes", "textarea_rows" => "4", "textarea_cols" => "80"), "phones" => array("method" => "textarea", "friendly_name" => "Phone Numbers", "description" => "Enter a comma separated list of Phone Numbers for this notification list.", "value" => "|arg1:phones|", "class" => "textAreaNotes", "textarea_rows" => "4", "textarea_cols" => "80"), "id" => array("method" => "hidden_zero", "value" => "|arg1:id|"), "save_component" => array("method" => "hidden", "value" => "1")); draw_edit_form(array("config" => array(), "fields" => inject_form_variables($fields_notification, isset($list) ? $list : array()))); html_end_box(); form_save_button("notify_lists.php", "return"); } elseif ($current_tab == "hosts") { hosts($header_label); } elseif ($current_tab == "tholds") { tholds($header_label); } else { templates($header_label); } }
public function lottery() { //最新揭晓 $page = System::load_sys_class('page'); $total = $this->db->GetCount("select id from `@#_shoplist` where `q_uid` is not null and `q_showtime` = 'N'"); if (isset($_GET['p'])) { $pagenum = $_GET['p']; } else { $pagenum = 1; } $num = 20; $page->config($total, $num, $pagenum, "0"); $shopqishu = $this->db->GetPage("select * from `@#_shoplist` where `q_uid` is not null and `q_showtime` = 'N' ORDER BY `q_end_time` DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0)); $shoplist = $this->db->GetList("select * from `@#_shoplist` where `q_uid` is null ORDER BY `canyurenshu` DESC LIMIT 4"); $member_record = $this->db->GetList("select * from `@#_member_go_record` order by id DESC limit 6"); include templates("index", "lottery"); }
public function nei() { $id = abs(intval($this->segment(4))); if (!$id) { _message("页面错误"); } $tiezi = $this->db->GetOne("select * from `@#_quanzi_tiezi` where `id`='{$id}'"); if (!$tiezi) { _message("页面错误"); } $dianji = $tiezi['dianji'] + 1; $this->db->Query("UPDATE `@#_quanzi_tiezi` SET `dianji`='{$dianji}' where `id`='{$id}'"); $title = $tiezi['title'] . "_" . _cfg("web_name"); $keywords = $tiezi['title']; $description = _strcut($tiezi['neirong'], 0, 250); $member = $this->db->GetOne("select * from `@#_member` where `uid`='{$tiezi['hueiyuan']}'"); $quanzi = $this->db->GetOne("select * from `@#_quanzi` where `id` = '{$tiezi['qzid']}'"); $num = 10; $total = $this->db->GetCount("select * from `@#_quanzi_hueifu` where `tzid` = '{$tiezi['id']}'"); $page = System::load_sys_class('page'); if (isset($_GET['p'])) { $pagenum = $_GET['p']; } else { $pagenum = 1; } $page->config($total, $num, $pagenum, "0"); if ($pagenum > $page->page) { $pagenum = $page->page; } $hueifu = $this->db->GetPage("select * from `@#_quanzi_hueifu` WHERE tzid='{$tiezi['id']}' order by id DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0)); foreach ($hueifu as $key => $val) { $hueifu[$key]['hueifu'] = _htmtocode($hueifu[$key]['hueifu']); } include templates("group", "nei"); }
public function mobilecheck() { $title = "手机认证 - " . _cfg("web_name"); $check_code = _encrypt($this->segment(4), "DECODE"); $check_code = @unserialize($check_code); if (!$check_code || !isset($check_code['name']) || !isset($check_code['time'])) { _message("参数不正确或者验证已过期!", WEB_PATH . '/register'); } $name = $check_code['name']; $member = $this->db->GetOne("SELECT * FROM `@#_member` WHERE `reg_key` = '{$check_code['name']}' and `time` = '{$check_code['time']}' LIMIT 1"); if (!$member) { _message("未知的来源!", WEB_PATH . '/register'); } if ($member['mobilecode'] == '1') { _message("该账号验证成功", WEB_PATH . "/login"); } if ($member['mobilecode'] == '-1') { $sendok = send_mobile_reg_code($member['reg_key'], $member['uid']); if ($sendok[0] != 1) { _message($sendok[1]); } header("location:" . WEB_PATH . "/member/user/mobilecheck/" . $this->segment(4)); exit; } if (isset($_POST['submit'])) { $checkcodes = isset($_POST['checkcode']) ? $_POST['checkcode'] : _message("参数不正确!"); if (strlen($checkcodes) != 6) { _message("验证码输入不正确!"); } $usercode = explode("|", $member['mobilecode']); if ($checkcodes != $usercode[0]) { _message("验证码输入不正确!"); } $fili_cfg = System::load_app_config("user_fufen"); if ($member['yaoqing']) { $time = time(); $yaoqinguid = $member['yaoqing']; //福分、经验添加 if ($fili_cfg['f_visituser']) { $this->db->Query("insert into `@#_member_account` (`uid`,`type`,`pay`,`content`,`money`,`time`) values ('{$yaoqinguid}','1','福分','邀请好友奖励','{$fili_cfg['f_visituser']}','{$time}')"); } $this->db->Query("UPDATE `@#_member` SET `score`=`score`+'{$fili_cfg['f_visituser']}',`jingyan`=`jingyan`+'{$fili_cfg['z_visituser']}' where uid='{$yaoqinguid}'"); } $check = $this->db->Query("UPDATE `@#_member` SET mobilecode='1',mobile='{$member['reg_key']}' where `uid`='{$member['uid']}'"); _message("验证成功", WEB_PATH . "/login"); } $enname = substr($name, 0, 3) . '****' . substr($name, 7, 10); $time = 120; $namestr = $this->segment(4); include templates("user", "mobilecheck"); }
<p id="p1" style="display: none;"></p> <h3 style="display: none;"><a target="_blank" href="http://demo9.52jscn.com/MyCart/CartList.html" class="orange_btn">去购物车结算</a></h3> </div> </dd> <dd class="quick_service"><a id="btnRigQQ" href="javascript:void();" class="quick_serviceA "><b>在线客服</b><s></s></a></dd> <dd class="quick_Collection"><a id="btnFavorite" href="javascript:void();" class="quick_CollectionA"><b>收藏本站</b><s></s></a></dd> <dd class="quick_Return"><a id="btnGotoTop" href="javascript:void()" class="quick_ReturnA"><b>返回顶部</b><s></s></a></dd> </dl> </div> <div id="divRighRaff" class="quick_publish_bottom" style="display: none;"> <dl class="quick_But"> <dd class="quick_publish"> <a id="btnRigRaff" href="javascript:void()" class="quick_publishA"><b>正在揭晓</b><s></s><em style="display:none;">0</em></a> <div id="raffBox" style="display: none;" class="Roll_publish"> <div id="raff_container" class="Roll_publish_list"> <div id="raff_shower" style="position: absolute; overflow: hidden;"> <ul id="ulRaffList"></ul> </div> </div> <div id="raff_scroller" class="raff_scroller"> <div id="raff_scroll_bar" class="raff_scroll_bar"></div> </div> </div> <div id="raffClose" class="roll_close"><a href="javascript:;" title="收起"></a></div> </dd> </dl> </div> <?php include templates("index", "footer");
public function buyDetail() { $webname = $this->_cfg['web_name']; $member = $this->userinfo; $itemid = intval($this->segment(4)); $itemlist = $this->db->GetList("select *,a.time as timego,sum(gonumber) as gonumber from `@#_member_go_record` a left join `@#_shoplist` b on a.shopid=b.id where a.uid='{$member['uid']}' and b.id='{$itemid}' group by a.id order by a.time"); if (!empty($itemlist)) { if ($itemlist[0]['q_end_time'] != '') { //商品已揭晓 $itemlist[0]['codeState'] = '已揭晓...'; $itemlist[0]['class'] = 'z-ImgbgC02'; } elseif ($itemlist[0]['shenyurenshu'] == 0) { //商品购买次数已满 $itemlist[0]['codeState'] = '已满员...'; $itemlist[0]['class'] = 'z-ImgbgC01'; } else { //进行中 $itemlist[0]['codeState'] = '进行中...'; $itemlist[0]['class'] = 'z-ImgbgC01'; } $bl = $itemlist[0]['canyurenshu'] / $itemlist[0]['zongrenshu'] * 100; foreach ($itemlist as $k => $v) { $count += $v['gonumber']; } } $count = $count ? $count : 0; include templates("mobile/user", "userbuyDetail"); }
public function qiandao() { # 签到时间限制(不能夸天哦。。) $time_start = '00:01'; $time_stop = '23:59'; # 每日签到增加夺宝币 $time_score = 50; # 连续签到的天数 $time_day = 30; # 连续签到增加的夺宝币 $time_day_score = rand(10000, 15000); if ($this->segment(4) == 'mobile') { function x__message($a, $b = null, $c = 2) { _messagemobile($a, $b, $c); } } else { function x__message($a, $b = null, $c = 2) { _message($a, $b, $c); } } $member = $this->userinfo; if (isset($_REQUEST['submit']) || $this->segment(5) == 'submit') { if (!$member['mobile']) { x__message("非常抱歉只有手机验证会员才能签到喔", WEB_PATH . "/mobile/home/qiandao/" . $this->segment(4)); } else { if ($member['sign_in_date'] == date('Y-m-d')) { x__message("您今天已经过签到了。", WEB_PATH . "/mobile/home/qiandao/" . $this->segment(4)); } else { if (strtotime(date('Y-m-d') . $time_start) > time() || strtotime(date('Y-m-d') . $time_stop) < time()) { x__message("现在不是签到时间!签到时间为{$time_start}点到{$time_stop}点", WEB_PATH . "/mobile/home/qiandao/" . $this->segment(4)); } else { $mysql_model = System::load_sys_class('model'); if ($member['sign_in_date'] == date('Y-m-d', strtotime('-1 day'))) { # 连续签到 if ($member['sign_in_time'] >= $time_day) { $member['sign_in_time'] = 0; } $sign_in_time = $member['sign_in_time'] + 1; $sign_in_time_all = $member['sign_in_time_all'] + 1; $sign_in_date = date('Y-m-d'); $score = $member['score'] + $time_score; if ($sign_in_time >= $time_day) { # 领取大礼包了 $score += $time_day_score; $big = true; } else { $big = false; } $mysql_model->Query("INSERT INTO `@#_member_account` (`uid`, `type`, `pay`, `content`, `money`, `time`) VALUES ('" . $member['uid'] . "', '1', '夺宝币', '每日签到', '{$time_score}', '" . time() . "')"); $mysql_model->Query("UPDATE `@#_member` SET score='" . $score . "',sign_in_time='" . $sign_in_time . "', sign_in_time_all='" . $sign_in_time_all . "', sign_in_date='" . $sign_in_date . "' where uid='" . $member['uid'] . "'"); if ($big) { $mysql_model->Query("INSERT INTO `@#_member_account` (`uid`, `type`, `pay`, `content`, `money`, `time`) VALUES ('" . $member['uid'] . "', '1', '夺宝币', '签到大礼包', '{$time_day_score}', '" . time() . "')"); x__message("签到成功,成功领取{$time_score}夺宝币。<br />恭喜您获得{$time_day_score}夺宝币的大礼包。<br />您的当前夺宝币为{$score}", WEB_PATH . "/mobile/home/qiandao/" . $this->segment(4), 10); } else { x__message("签到成功,成功领取{$time_score}夺宝币。<br />您的当前夺宝币为{$score}。<br />再连续签到" . ($time_day - $sign_in_time) . "天就能领取大礼包啦,加油!!!", WEB_PATH . "/mobile/home/qiandao/" . $this->segment(4)); } } else { $sign_in_time = 1; $sign_in_time_all = $member['sign_in_time_all'] + 1; $sign_in_date = date('Y-m-d'); $score = $member['score'] + $time_score; $mysql_model->Query("INSERT INTO `@#_member_account` (`uid`, `type`, `pay`, `content`, `money`, `time`) VALUES ('" . $member['uid'] . "', '1', '夺宝币', '每日签到', '{$time_score}', '" . time() . "')"); $mysql_model->Query("UPDATE `@#_member` SET score='" . $score . "',sign_in_time='" . $sign_in_time . "', sign_in_time_all='" . $sign_in_time_all . "', sign_in_date='" . $sign_in_date . "' where uid='" . $member['uid'] . "'"); x__message("签到成功,成功领取{$time_score}夺宝币。<br />您的当前夺宝币为{$score}", WEB_PATH . "/mobile/home/qiandao/" . $this->segment(4)); } } } } die; } if (!$member['sign_in_date']) { $member['sign_in_date'] = '-'; } else { if ($member['sign_in_date'] != date('Y-m-d') && $member['sign_in_date'] != date('Y-m-d', strtotime('-1 day'))) { $member['sign_in_time'] = 0; } } if (!$this->segment(4) == 'mobile') { include templates("mobile/user", "qiandao"); } else { include templates("member", "qiandao"); } }
public function singlelist() { $webname = $this->_cfg['web_name']; include templates("mobile/user", "singlelist"); }
function edit() { global $tabs_thold, $config; /* ================= input validation ================= */ get_filter_request_var('id'); get_filter_request_var('tab', FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => '/^([a-zA-Z]+)$/'))); /* ==================================================== */ /* set the default tab */ load_current_session_value('tab', 'sess_thold_notify_tab', 'general'); $current_tab = get_request_var('tab'); if (sizeof($tabs_thold) && isset_request_var('id')) { print "<div class='tabs'><nav><ul>\n"; if (sizeof($tabs_thold)) { foreach (array_keys($tabs_thold) as $tab_short_name) { print "<li><a class='pic" . ($tab_short_name == $current_tab ? ' selected' : '') . "' href='" . $config['url_path'] . 'plugins/thold/notify_lists.php' . '?action=edit&id=' . get_filter_request_var('id') . '&tab=' . $tab_short_name . "'>" . $tabs_thold[$tab_short_name] . "</a></li>\n"; } } print "</ul></nav></div>\n"; } $header_label = get_notification_header_label(); if (isset_request_var('id')) { $list = db_fetch_row('SELECT * FROM plugin_notification_lists WHERE id=' . get_request_var('id')); } else { $list = array(); $current_tab = 'general'; } if ($current_tab == 'general') { form_start('notify_lists.php'); html_start_box(__('List General Settings') . ' ' . htmlspecialchars($header_label), '100%', '', '3', 'center', ''); $fields_notification = array('name' => array('method' => 'textbox', 'friendly_name' => __('Name'), 'description' => __('Enter a name for this Notification List.'), 'value' => '|arg1:name|', 'max_length' => '80'), 'description' => array('method' => 'textarea', 'friendly_name' => __('Description'), 'description' => __('Enter a description for this Notification List.'), 'value' => '|arg1:description|', 'class' => 'textAreaNotes', 'textarea_rows' => '2', 'textarea_cols' => '80'), 'emails' => array('method' => 'textarea', 'friendly_name' => __('Email Addresses'), 'description' => __('Enter a comma separated list of Email addresses for this Notification List.'), 'value' => '|arg1:emails|', 'class' => 'textAreaNotes', 'textarea_rows' => '4', 'textarea_cols' => '80'), 'id' => array('method' => 'hidden_zero', 'value' => '|arg1:id|'), 'save_component' => array('method' => 'hidden', 'value' => '1')); draw_edit_form(array('config' => array(), 'fields' => inject_form_variables($fields_notification, isset($list) ? $list : array()))); html_end_box(); form_save_button('notify_lists.php', 'return'); } elseif ($current_tab == 'hosts') { hosts($header_label); } elseif ($current_tab == 'tholds') { tholds($header_label); } else { templates($header_label); } }
public function itmeifram() { $itemid = safe_replace($this->segment(4)); $item = $this->db->GetOne("select * from `@#_shoplist` where `id`='{$itemid}' LIMIT 1"); $shop_sid = $this->db->GetList("select id from `@#_shoplist` where `sid`='{$item['sid']}' and `id` != '{$itemid}'"); $shop_sid_str = ''; for ($i = 0; $i < count($shop_sid); $i++) { $shop_sid_str .= $shop_sid[$i]['id'] . ','; } $shop_sid_str = trim($shop_sid_str, ','); if (!empty($shop_sid_str)) { $error = 0; $page = System::load_sys_class('page'); $total = $this->db->GetCount("select * from `@#_shaidan` where `sd_shopid` in ({$shop_sid_str})"); if (isset($_GET['p'])) { $pagenum = $_GET['p']; } else { $pagenum = 1; } $num = 10; $page->config($total, $num, $pagenum, "0"); $shaidan = $this->db->GetPage("select * from `@#_shaidan` where `sd_shopsid` = '{$item['sid']}' order by sd_id DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0)); foreach ($shaidan as $k => $v) { $t = explode(';', $v['sd_photolist']); $shaidan[$k]['sd_photolist'] = $t; } foreach ($shaidan as $key => $val) { $member_info = $this->db->GetOne("select * from `@#_member` where `uid`='{$val['sd_userid']}'"); $member_img[$val['sd_id']] = $member_info['img']; $member_id[$val['sd_id']] = $member_info['uid']; $member_username[$val['sd_id']] = $member_info['username']; } } else { $error = 1; } include templates("index", "itemifram"); }
public function userindex() { $webname = $this->_cfg['web_name']; $uid = safe_replace($this->segment(4)); //$uid=intval($this->segment(4))-1000000000; //获取个人资料 $member = $this->db->GetOne("select * from `@#_member` where `uid`='{$uid}'"); //获取购买等级 购买新手 购买小将== $memberdj = $this->db->GetList("select * from `@#_member_group`"); $jingyan = $member['jingyan']; if (!empty($memberdj)) { foreach ($memberdj as $key => $val) { if ($jingyan >= $val['jingyan_start'] && $jingyan <= $val['jingyan_end']) { $member['yungoudj'] = $val['name']; } } } include templates("mobile/index", "userindex"); }