public function index() { if (!$GLOBALS['islogin']) { redirect($GLOBALS['s']['urlsite'] . '/member/login'); } $college = M("college"); $collegeList = $college->select(); $this->assign('collegeList', $collegeList); $cid = getvar('college', 1); $c = $college->where("id={$cid}")->find(); $c = $c["name"]; //dump($c); $sex = $GLOBALS['i']['sex'] == 1 ? 2 : 1; $a = ''; if ($cid != "") { $a = " AND college='{$c}'"; $b = "class=currt"; } $a .= $GLOBALS['i']['sex'] == 2 ? ' AND default_photonum>0' : ''; $orderby = getvar('orderby', array('login_time', 'register_time')); $member = M('member'); $count = $member->where("group_type>0 AND sex={$sex}.{$a}")->count(); //echo $member->getLastSql(); import("@.ORG.Page"); $page = new Page($count, 10); $memberlist = $member->field('uid, sex, username, default_pic, is_videoauth, photonum, login_time, class, college, height, hometown_prov, hometown_city, birth_y, constellation, blood, stature, grade, introduce, want_content')->where("group_type>0 AND sex={$sex}.{$a}")->order("{$orderby} DESC")->limit($page->firstRow . ',' . $page->listRows)->select(); //echo $member->getLastSql(); $this->assign('memberlist', $memberlist); $this->assign('sex', $sex); $this->assign('orderby', $orderby); $this->assign('b', $b); $this->assign('cid', $cid); $this->assign('pages', $page->show(1)); $this->display(); }
public function share_score() { $uid = getvar('uid', 1); if ($GLOBALS['islogin'] && ($GLOBALS['i']['uid'] == $uid || !$uid)) { $m = $GLOBALS['i']; } else { $member = M('member'); $m = $member->field('uid, username, sex, default_pic, score_impress')->where("uid={$uid}")->find(); if (!$m) { $this->error('找不到此人'); } } $img = $GLOBALS['s']['pathupload'] . $m['default_pic'] . '_qq.jpg'; if (!is_file($img) || filemtime($img) + 86400 < time()) { $tpl = $GLOBALS['s']['pathupload'] . '/000face/share_score.jpg'; $water = $GLOBALS['s']['pathupload'] . $m['default_pic'] . '_240x240.jpg'; $girl = array('邻家女孩', '古典美', '大眼妹妹', '潮女', '皮肤好白', '性感', '奶茶妹妹', '似曾相识', '乖乖女', '时尚的女生', '惊艳', '眼睛好漂亮', '脖子很性感', '你很爱笑哦', '距离感', '风情女', '帅气的女生', '朋克女生', '好迷你好娇小', '野性', '小资文艺女', '温柔的美女', '小萝莉', '有气质', '氧气美女', '身材很魔鬼', '骨感的女生', '冰雪女王', '笑得好妩媚好温暖', '好淑女'); $boy = array('骑着白马的唐僧', '好美啊!', '贵族王子', '魅力型男', '灰太狼', '潮男', '莲花小王子', '背包客', '眼神犀利', '阳光宅男', '黑框眼镜男', '迷茫弟', '王子范儿', '西装笔挺', '运动健将', '纯爷们', '很有潜力', '三好学生', '火星男', '文艺青年', '极品好男人', '成熟', '霸气外露', '坏男人', '体魄强健', '老实本分', '心好男人', '绅士', '这货不简单', '猥琐'); $arr = $m['sex'] == 1 ? $boy : $girl; $a1 = rand(0, 29); $a2 = ($a1 + rand(1, 3)) % 30; $a3 = ($a2 + rand(1, 3)) % 30; $a4 = ($a3 + rand(1, 3)) % 30; import('@.ORG.Image'); //font-size, margin-left, margin-top, font-color, text $text = array(array(20, 50, 0, array(10, 10, 10), '您的照片在网站上获得 分'), array(28, 323, -35, array(240, 0, 35), $m['score_impress']), array(24, 195 + $a1 - strlen($arr[$a1]) * 5.5, -10, array(153, 0, 153), $arr[$a1]), array(24, 195 + $a2 - strlen($arr[$a2]) * 5.5, -10, array(102, 100, 204), $arr[$a2]), array(24, 195 + $a3 - strlen($arr[$a3]) * 5.5, -10, array(0, 0, 255), $arr[$a3]), array(24, 195 + $a4 - strlen($arr[$a4]) * 5.5, -10, array(0, 204, 51), $arr[$a4])); Image::share_pic($tpl, $water, $img, 100, $text); //Image::buildString('你们好啊', array(102, 104, 104), $img); } $this->assign('m', $m); $this->display(); }
public function add() { if ($GLOBALS['islogin']) { $uid = $GLOBALS['i']['uid']; $visit_uid = getvar('uid', 1); if ($uid != $visit_uid) { $member = M('member'); $u = $member->field('sex')->where("uid={$visit_uid}")->find(); if ($u && $u['sex'] != $GLOBALS['i']['sex']) { $visit = M('visit'); $data['uid'] = $uid; $data['visit_uid'] = $visit_uid; $rs = $visit->field('id')->where($data)->find(); //echo '<!--', $visit->getLastSql(), '-->'; if (!$rs) { $data['add_time'] = time(); $id = $visit->add($data); } else { $visit->where($data)->setField('add_time', time()); } $member_field = M('member_field'); $data1['new_visitor'] = array('exp', 'new_visitor+1'); $member_field->where("uid={$visit_uid}")->save($data1); } } } }
function get_oauth_token() { global $twitterObj; $twitterObj = new EpiTwitter(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET, getvar('oauth_token', '')); // $twitterObj->setToken(getvar('oauth_token', '')); $token = $twitterObj->getAccessToken(); //$twitterObj->setToken($token->oauth_token, $token->oauth_token_secret); return $token; }
/** * @@desc Xuat ra chi thi cho phep download file */ function download($name) { $user = getvar('UserName'); $folder = "temp/{$user}/"; $name = $name . '_' . date('y-m-d_His') . '.pdf'; $file = $folder . $name; $this->Output($file, 'F'); message("In thành công!<ul><li>Click chuột trái vào tên file để mở file trên cửa sổ mới.<li>Click chuột phải vào tên file và chọn <b>Save target as...</b> để lưu file.</ul><center><a href='get.php?f={$name}' target=_blank>{$name}</a></center>"); }
public function index_login() { $invite_uid = getvar('uid', 1); if ($invite_uid) { cookie('invite_uid', $invite_uid, 180); } $member = M('member'); $memberlist1 = $member->field('uid, sex, username, default_pic, college, want_content, photonum, score_impress')->where("default_pic!='' AND sex=1 AND default_photonum>0 AND group_type>0")->order('uid DESC')->limit('5, 2')->select(); $memberlist2 = $member->field('uid, sex, username, default_pic, college, want_content, photonum, score_impress')->where("default_pic!='' AND sex=2 AND default_photonum>0 AND group_type>0")->order('uid DESC')->limit('1, 8')->select(); $memberlist3 = $member->field('uid, sex, username, default_pic, college, want_content, photonum, score_impress')->where("default_pic!='' AND sex=1 AND default_photonum>0 AND group_type>0")->order('uid DESC')->limit('7, 17')->select(); $memberlist = array_merge($memberlist1, $memberlist2, $memberlist3); $rand = rand(1, 9); $mosaic = ''; for ($i = 1; $i < 33; $i++) { $pixel = 120; if ($i > 25) { $pixel = 32; } elseif ($i > 15) { $pixel = 48; } elseif ($i > 5) { $pixel = 72; } else { $pixel = 120; } $pz = $pixel == 32 ? 48 : $pixel; $mosaic .= "<div id=\"mp_c{$i}\" class=\"mp_c mp_cs{$pixel}\">"; if (($i + $rand) % 5 == 0) { //if(1) { $rand = ($i + $rand + 3) % 9 + 1; $mosaic .= "<div class=\"mp_c_p mp_c_p{$rand} mp_c_tz\">"; } else { $m = current($memberlist); $mj = json_encode($m); $mj = str_replace('"', "'", $mj); next($memberlist); $mosaic .= '<div class="mp_c_ph mp_c_tz">'; $mosaic .= "<a class=\"mp_c_ph_l\" target=\"_blank\" href=\"{$GLOBALS['s']['urldomain']}/{$m['uid']}\">\n<img id=\"img_0_{$i}\" class=\"mp_c_ph_img\" width=\"{$pixel}\" height=\"{$pixel}\" src=\"{$GLOBALS['s']['urlupload']}{$m['default_pic']}_{$pz}x{$pz}.jpg\" title=\"{$m['username']}的个人档案\" alt=\"{$m['username']}的个人档案\" onmouseover=\"show_user_tips({$i},{$mj})\" /></a>"; } $mosaic .= '</div></div>'; } $count = $member->count() + 1212; $counter = ''; $n = $count; $i = 1; while ($n > 0) { $num = $n % 10; if ($i % 3 == 1 && $i > 1) { $counter = '<span class="mp_cnt_d mp_cnt_space"><span class="mp_cnt_d_os"></span></span>' . $counter; } $counter = "<span class=\"mp_cnt_d mp_cnt_d_{$num}\"><span class=\"mp_cnt_d_o\">{$num}</span> <i class=\"mp_cnt_d_f\"></i></span>" . $counter; $n = ($n - $num) / 10; $i++; } $this->assign('mosaic', $mosaic); $this->assign('counter', $counter); $this->display('index_login'); }
/** * Checks, wheter a page is actually in INSERT or UPDATE mode an creates the corresponding * Saveset. */ function process() { global $page_action; $this->posFilter = str_replace("<chcat>", "CHID = " . getvar("chsel"), $this->posFilter); $pos = getDBCell($this->table, $this->column, $this->posFilter . " AND " . $this->column . "=" . $this->value); if ($pos != "") { freeRowPosition($this->table, $this->column, $this->value, $this->posFilter); } if ($page_action == "INSERT") { addInsert($this->table, $this->column, $this->value, $this->datatype); } else { if ($page_action == "UPDATE") { addUpdate($this->table, $this->column, $this->value, $this->row_identifier, $this->datatype); } } }
public function sender() { if (!$GLOBALS['islogin']) { redirect($GLOBALS['s']['urlsite'] . '/member/login'); } $question = M("question"); $map['uid'] = $GLOBALS['i']['uid']; $order = getvar('order', 1); if ($order == 0) { $b = "new_answer desc,"; } $list = $question->where($map)->order("{$b} add_time desc")->select(); //echo $question->getLastSql(); $this->assign('list', $list); $this->assign('order', $order); $this->display(); }
public function callback() { $site = getvar('site', array('qq', 'sina', 'ren', 'tao')); include_once APP_PATH . "/Lib/Extend/apilogin/{$site}.class.php"; $platform = new $site(); $openid = $platform->getOpenId(); if (!$openid) { $this->error('系统繁忙,请稍候重试一下啊'); exit; } $member_field = M('member_field'); //已登录用户同步设置开始 if ($GLOBALS['islogin']) { $sync['qquid'] = $openid; $sync['qq_oauth'] = $platform->get_oauth(); $member_field->where("uid={$GLOBALS['i']['uid']}")->save($sync); redirect(cookie('referer')); exit; } //已登录用户同步设置结束 $u = $member_field->field('qh_member_field.uid')->join("qh_member ON qh_member.uid=qh_member_field.uid")->where("qquid='{$openid}'")->find(); //exit($member_field->getLastSql()); if ($u) { cookie('uid', $u['uid'], 86400); $member = M('member'); $edit['login_time'] = time(); $edit['login_times'] = array('exp', 'login_times+1'); $edit['login_ip'] = get_client_ip(); $member->where("uid={$u['uid']}")->save($edit); $member_field->where("uid={$u['uid']}")->setField('qq_oauth', $platform->get_oauth()); redirect(cookie('referer')); exit; } else { $openuser = $platform->getUserInfo(); cookie('open_uid', $openuser['uid'], 0); cookie('open_name', $openuser['name'], 0); cookie('open_sex', $openuser['sex'], 0); cookie('open_pic', $openuser['pic'], 0); cookie('open_province', $openuser['province'], 0); cookie('open_city', $openuser['city'], 0); cookie('open_oauth', $platform->get_oauth(), 0); //exit($GLOBALS['s']['urlsite'] . '/member/reg_active'); $memberAction = A('Member'); $memberAction->reg_active(); } }
function index() { $data['title'] = $this->title; $data['controller'] = $this->controller; $data['help'] = $this->help; $data['admin'] = getvar("admin", 100000); $data['col_lancar'] = getvar("col_lancar", 0); $data['col_no_lancar'] = getvar("col_no_lancar", 14); $data['col_macet'] = getvar("col_macet", 14); $data['hari_telat'] = getvar("hari_telat", 14); //kurang dari 14 masuk sa, lebih masuk adminls $data['penalty'] = getvar("penalty", 2); $data['denda_prc'] = getvar("denda_prc", 5); $data['denda_hari'] = getvar("denda_hari", 8); $data = array_merge($data, $this->gl_link()); $this->template->display_form_input($this->file_view, $data); }
function __construct($thisurl, $template = 'base.tpl') { parent::__construct($template); $this->object = array(); $this->assign('title', APP_NAME); $this->assign('formaction', $thisurl); $this->assign('doctype', "<!DOCTYPE html>"); // We obtain the mode $this->mode = getvar('mode', 'show'); $this->order = getvar('order', ''); // We use a dummy object to generate the needed elements for the canvas. $this->common = new Element(); $this->common->addMeta('content-type', 'text/html;charset=utf-8'); $this->common->addCSSRef(APP_URL . 'files/gen.css.php'); $this->common->addScriptRef(APP_URL . 'files/gen.js'); $this->common->setFormVar('mode', $this->mode); $this->common->setFormVar('order', $this->order); }
public function card_log() { if (!$GLOBALS['islogin']) { redirect($GLOBALS['s']['urlsite'] . '/member/login'); } $type = getvar('type', array('link', 'refund', 'buy')); $card_log = M("card_log"); $uid = $GLOBALS['i']['uid']; import("@.ORG.Page"); $count1 = $card_log->where("uid={$uid} AND type='{$type}'")->count(); $page1 = new Page($count1, 10); $list = $card_log->where("uid={$uid} AND type='{$type}'")->order('add_time DESC')->limit($page1->firstRow . ',' . $page1->listRows)->select(); //echo $card_log->getLastSql(); $this->assign('pages1', $page1->show()); //dump($page1); $this->assign('list', $list); $this->assign('type', $type); $this->display(); }
public function xiaoyuannannv() { $guest_name = cookie('username'); $guest_pic = cookie('guest_pic'); if (!$guest_pic) { $guest_pic = '/000face/ask_' . rand(1, 9) . '.jpg'; cookie('guest_pic', $guest_pic); } $GLOBALS['i'] = array('uid' => 0, 'username' => $guest_name ? $guest_name : '游客', 'default_pic' => '/000face/s1.jpg'); $college = M("college"); $collegeList = $college->select(); $this->assign('collegeList', $collegeList); $cid = getvar('college', 1); $c = $college->where("id={$cid}")->find(); $c = $c["name"]; //dump($c); $sex = getvar('sex', 1); $addsql = ''; if ($sex) { $addsql .= "AND sex={$sex}"; } if ($cid != "") { $addsql .= " AND college='{$c}'"; $b = "class=currt"; } $orderby = getvar('orderby', array('login_time', 'register_time')); $member = M('member'); $count = $member->where("default_photonum>0 AND group_type>0 {$addsql}")->count(); //echo $member->getLastSql(); import("@.ORG.Page"); $page = new Page($count, 10); $memberlist = $member->field('uid, sex, username, default_pic, is_videoauth, photonum, login_time, class, college, height, hometown_prov, hometown_city, birth_y, constellation, blood, stature, grade, introduce, want_content')->where("default_photonum>0 AND group_type>0 {$addsql}")->order("{$orderby} DESC")->limit($page->firstRow . ',' . $page->listRows)->select(); //echo $member->getLastSql(); $this->assign('memberlist', $memberlist); $this->assign('sex', $sex); $this->assign('orderby', $orderby); $this->assign('b', $b); $this->assign('cid', $cid); $this->assign('pages', $page->show(1)); $this->display(); }
</div> </fieldset> </form> <?php if (!empty($_GET)) { $searchfilters = array("name" => "data.name || ' ' || data.lastname ILIKE " . $dbh->quote("%" . getvar("name") . "%"), "room" => "data.room = " . $dbh->quote(getvar("room")), "activity" => "data.activity = " . $dbh->quote(getvar("activity")), "date1" => "data.dob > " . $dbh->quote(getvar("date1")), "date2" => "data.dob < " . $dbh->quote(getvar("date2")), "date3" => "data.\"joinDate\" > " . $dbh->quote(getvar("date3")), "date4" => "data.\"joinDate\" < " . $dbh->quote(getvar("date4")), "date5" => "data.\"lastSeen\" > " . $dbh->quote(getvar("date5")), "date6" => "data.\"lastSeen\" < " . $dbh->quote(getvar("date6"))); $wherequery = array(); foreach ($searchfilters as $n => $q) { $v = getvar($n); if (!empty($v)) { $wherequery[] = $q; } } $query = "SELECT DISTINCT data.id, data.name, lastname, paging, room, activity\n FROM data"; if (count($wherequery) > 0) { $query .= " WHERE " . (getvar("invert") == "on" ? " NOT " : "") . "(" . implode(" and ", $wherequery) . ")"; } $query .= " ORDER BY lastname;"; $result = pg_query($connection, $query) or die(_("Error in query") . ": {$query}." . pg_last_error($connection)); if (pg_num_rows($result) == 0) { echo '<div class="alert alert-error"> <a class="close" data-dismiss="alert" href="#">×</a> <h4 class=\\"alert-heading\\">' . _('No results') . '</h4> </div>'; } else { echo '<table class="table"> <thead> <tr> <script language="JavaScript"> function toggle(source) { checkboxes = document.getElementsByName(\'foo\');
<?php session_start(); require_once "../session.php"; require_once '../inc/const.php'; $act = $_GET['act']; $id = getvar('id'); $fid = getvar('fid'); $name = getvar('name'); $rank = getvar('rank'); if ($act == 'add') { $record = array('fid' => $fid, 'name' => $name, 'rank' => $rank, 'dateline' => date("y-m-d H-i-s")); $id = $db->insert($GLOBALS[databasePrefix] . 'industry', $record); echo "<script>alert('添加成功!');window.location='customer_industry.php';</script>"; } if ($act == 'mod') { $record = array('fid' => $fid, 'name' => $name, 'rank' => $rank); $db->update($GLOBALS[databasePrefix] . 'industry', $record, 'id=' . $id); echo "<script>alert('修改成功!');window.location='customer_industry.php';</script>"; } //删除 if ($act == 'del') { $db->delete($GLOBALS[databasePrefix] . 'industry', 'id=' . $id); echo "<script>alert('删除成功!');window.location='customer_industry.php';</script>"; }
} break; /* --------------------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------------------- */ case 'play': // We create the toolbar $t = new Toolbar(); $t->addAction('Back', 'show()', 'go-back'); $t->addAction('Play', 'togglePlay()', 'media-playback-start'); $t->addRawBlock("<div id='clock' class='clock'></div>"); $t->addAction('Reset', 'trackReset()', 'media-playback-stop'); $c->register($t); // We should receive a scalefactor. $scl = floatval(getvar('scl', '0.7')); // We must receive an id. if ($trackid = getvar('trackid', '')) { // |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // We obtain some data from the participant first. $q->rawSelect('name as project,pid,agent,from_unixtime(offset/1000) as start')->from('track')->where("id={$trackid}"); $ppt = $q->runAndGetRow(); if ($ppt['project'] == '') { $ppt['project'] = '<em>None</em>'; } $t->addInfoPairs($ppt); // We get all the data. $events = $db->qSelect("select id,t,action,xtra1,xc,yc from event where track_id={$trackid} order by t,id"); $firstsize = array_shift($events); if ($firstsize['action'] != 'resize') { $c->displayMsg("Malformed tracking record (action=" . $firstsize['action'] . "). Cannot replay."); break; }
yesno('Can use karma system', 'canbonus'); echo '</tbody><tbody><tr><td class="subheader" colspan="2" align="center">Permissions: Viewing</td></tr>'; yesno('Can View UserCP?<br /><small>User can view his Control Page.</small>', 'canusercp'); yesno('Can View Profiles?<br /><small>User can view other user Profiles.</small>', 'canviewotherprofile'); yesno('Can View Memberlist?<br /><small>User can view Memberlist.</small>', 'canmemberlist'); yesno('Can View Friendlist?<br /><small>User can view Friendlist.</small>', 'canfriendslist'); yesno('Can View Top10 Page?<br /><small>User can view Top10 Page.</small>', 'cantopten'); echo '</tbody><tbody><tr><td class="subheader" colspan="2" align="center">Permissions: Administrative</td></tr>'; yesno('Can Edit User Settings?<br /><small>User Can Edit User Settings.</small>', 'caneditusersettings', $usergroup['caneditusersettings'] == 'yes' ? 'yes' : 'no'); yesno('Can Access Staff Panel?<br /><small>User can access Staff Panel of tracker.</small>', 'canstaffpanel'); echo '<tr class="subheader"><td align="center" colspan="2">Permissions: Limitations</td></tr>'; inputbox('Automatic Invite<br /><small>Set the limit of automatic invites for each month<br />Set to 0 to disable this.</small>', 'autoinvite', $usergroup['autoinvite']); echo '<tr> <td colspan="2" align="right"> <input type="submit" value="submit"> <input type="reset" value="reset"> </td> </tr>'; echo '</form></table></table>'; stdfoot(); } elseif ($action == 'creategroup') { getvar(array('gid', 'title', 'description', 'isbanned', 'canpm', 'candownload', 'canupload', 'canrequest', 'cancomment', 'canbookmark', 'canusercp', 'canresetpasskey', 'canviewotherprofile', 'canthanks', 'canshout', 'caninvite', 'canbonus', 'canmemberlist', 'canfriendlist', 'cantopten', 'caneditusersettings', 'canstaffpanel', 'autoinvite')); $addnew = sql_query("INSERT INTO usergroups( gid,\r\n title,\r\n description,\r\n isbanned,\r\n canpm,\r\n candownload,\r\n canupload,\r\n canrequest,\r\n cancomment,\r\n canbookmark,\r\n canusercp,\r\n canresetpasskey,\r\n canviewotherprofile,\r\n canthanks,\r\n canshout,\r\n caninvite,\r\n canbonus,\r\n canmemberlist,\r\n canfriendlist,\r\n cantopten,\r\n caneditusersettings,\r\n canstaffpanel,\r\n autoinvite)\r\n \r\n VALUES ( " . sqlesc($gid) . ",\r\n " . sqlesc($title) . ",\r\n " . sqlesc($description) . ",\r\n " . sqlesc($isbanned) . ",\r\n " . sqlesc($canpm) . ",\r\n " . sqlesc($candownload) . ",\r\n " . sqlesc($canupload) . ",\r\n " . sqlesc($canrequest) . ",\r\n " . sqlesc($cancomment) . ",\r\n " . sqlesc($canbookmark) . ",\r\n " . sqlesc($canusercp) . ",\r\n " . sqlesc($canresetpasskey) . ",\r\n " . sqlesc($canviewotherprofile) . ",\r\n " . sqlesc($canthanks) . ",\r\n " . sqlesc($canshout) . ",\r\n " . sqlesc($caninvite) . ",\r\n " . sqlesc($canbonus) . ",\r\n " . sqlesc($canmemberlist) . ",\r\n " . sqlesc($canfriendlist) . ",\r\n " . sqlesc($cantopten) . ",\r\n " . sqlesc($caneditusersettings) . ",\r\n " . sqlesc($canstaffpanel) . ",\r\n " . sqlesc($autoinvite) . ")") or sqlerr(__FILE__, __LINE__); if (!$addnew) { die('MySQL error.'); } else { header("Refresh: 0; url=" . $_SERVER["PHP_SELF"]); } } else { stderr('Error ', ' Invalid operation!'); }
<?php require __DIR__ . '/../includes/start.php'; $item_id = getvar("id"); $item = findItem($item_id); $item->shop; // Load that data for export $purchase = null; if (me()) { $purchase = findPurchase($item->id, me()->id); } $redirectUrl = "http" . (!empty($_SERVER['HTTPS']) ? "s" : "") . "://" . $_SERVER['HTTP_HOST'] . preg_replace('/item\\.php/', 'paid.php', $_SERVER['REQUEST_URI']); $pageTitle = "Purchase Item"; require __DIR__ . '/../includes/templates/header.php'; ?> <h1>Purchase Item</h1> <?php partial("breadcrumbs", ['category' => $item->category]); ?> <?php if (!$item) { ?> <div class="alert alert-danger"> That item doesn't appear to exist. Try searching for a different one. </div> <?php partial("search-bar", ['q' => ""]);
echo link_button("Hitung", "dlgBayar_Recalc()", "reload", "false"); ?> <?php echo link_button("Keluar", "dlgBayar_Close()", "remove", "false"); ?> <?php echo link_button("Proses", "dlgBayar_Save()", "save", "false"); ?> </div> <script language='javascript'> var denda_hari=<?php echo getvar("denda_hari", 7); ?> ; var denda_prc=<?php echo getvar("denda_prc", 5); ?> ; var def_denda=0; var def_bunga=0; var def_pokok=0; if(denda_prc>=1)denda_prc=denda_prc/100; function cmdSearch_Click() { $("#divResultBilling").fadeOut(); if($("#txtSearch").val()==""){alert("Isi nomor atau nama debitur !");return false}; var xurl='<?php echo base_url(); ?> index.php/leasing/loan/list_not_paid/'+$('#txtSearch').val(); $('#lstResult').fadeIn(); $('#dgItems').datagrid({url:xurl});
return $_POST[$name]; } else { return false; } } } if (get_magic_quotes_gpc()) { $code = stripslashes(getvar('code')); $mode = stripslashes(getvar('mode')); $scale = stripslashes(getvar('scale')); $encoding = stripslashes(getvar('encoding')); } else { $code = getvar('code'); $mode = getvar('mode'); $scale = getvar('scale'); $encoding = getvar('encoding'); } if (!$code) { $code = '123456789012'; } if (!$mode) { $mode = 'png'; } if (!$scale) { $scale = '2'; } if (!$encoding) { $encoding = 'EAN'; } barcode_print($code, $encoding, $scale, $mode); /*
public function taskdelete() { if (!$GLOBALS['islogin']) { redirect($GLOBALS['s']['urlsite'] . '/member/login'); } $tid = getvar('tid'); $del = M('task'); $del->where("tid={$tid}")->delete(); $task = M('task'); $count = $task->where("uid={$GLOBALS['i']['uid']}")->count(); import("@.ORG.Page"); $page = new Page($count, 10); $tasklist = $task->where("uid={$GLOBALS['i']['uid']}")->limit($page->firstRow . ',' . $page->listRows)->order("add_time DESC")->select(); $this->assign('tasklist', $tasklist); $this->assign('pages', $page->show()); $this->display(); }
import_request_variables("PGC", ""); // универсальное решение проблем //прием долбаных файлов // часть некоторых загрузок переменных можно удалить if (isset($_FILES["userfile"])) { ob_start(); } // такое чувство что эта часть кода просто игнорируется. $writefile = 1; if ($pr[36]) { if (!isset($_SERVER['PHP_AUTH_USER']) || $_POST['SeenBefore'] == 1 && $_POST['OldAuth'] == $_SERVER['PHP_AUTH_USER']) { authenticate(); } } if ($frameoldcore == 0) { $fil = getvar('fil'); } //было установлено неверное 1 if ($fil !== false) { $data = explode(";", $fil); $tbl = $data[0]; $vID = $data[1]; $vID2 = $data[2]; $datafieldcolsel = $data[3]; // virtual id } // настройка префиксов для работы с любым языкомым cmd if ($cmd == "ed") { $write = cmsg("KEY_EDIT"); } if ($cmd == "add") {
function countRecommend() { header('Content-type: application/json'); $user_id = (int) getvar('user_id', 'post'); $rebate = new Rebate(); $result = $rebate->countRecommend($user_id); if ($result) { echo json_encode($result); } else { echo 'false'; } }
<?php session_start(); include_once '../session.php'; include_once '../inc/const.php'; header("Cache-Control: public"); header("Pragma: public"); header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:attachment;filename=客户池.csv"); header('Content-Type:APPLICATION/OCTET-STREAM'); $s = getvar("s"); echo $s;
* Part of PHP-Barcode 0.3pl1 * (C) 2001,2002,2003,2004 by Folke Ashberg <*****@*****.**> * The newest version can be found at http://www.ashberg.de/bar * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ require "php-barcode.php"; function getvar($name) { global $_GET, $_POST; if (isset($_GET[$name])) { return $_GET[$name]; } else { if (isset($_POST[$name])) { return $_POST[$name]; } else { return false; } } } barcode_print(getvar('code'), getvar('encoding'), getvar('scale'), getvar('mode'), getvar('total_y'));
if (strcmp("{$EMAIL_PASSWORD}", "") != "") { $toSave["EMAIL_PASSWORD"] = $EMAIL_PASSWORD; } // Save configuration in DB configuration\saveEmailUserConf($toSave); // Write it in XML configuration\serverEmail_createXMLConf(); // Reload configuration configuration\reloadXMLinServer("serverMail"); break; case "testemail": $err = configuration\serverEmail_test(getvar("EMAIL_ADRESS")); echo json_encode($err); break; case "supervision": $toSave = array("checkPing_en" => getvar("checkPing_en"), "checkPing_adress" => getvar("checkPing_adress"), "checkPing_action" => getvar("checkPing_action"), "dailyReport_en" => getvar("dailyReport_en"), "monthlyReport_en" => getvar("monthlyReport_en")); // Save configuration in DB cultipi\saveSupervisionUserConf($toSave); // Write in XML cultipi\serverSupervision_createXMLConf(); break; case "sensors": // Save each element foreach ($_GET as $key => $value) { $table = ""; // Search which table must be modified if (strstr($key, "_tableSensor_")) { // This is table sensors $table = "sensors"; } if ($table != "") {
<?php // ================= VARIABLES ================= // $plug_count_sensor = array(); if (!isset($submit_plugs)) { $submit_plugs = getvar("submit_plugs"); } if (!isset($selected_plug)) { $selected_plug = getvar('selected_plug'); } if (!isset($submenu)) { $submenu = getvar("submenu", $main_error); } if (!isset($reccord)) { $reccord = getvar('reccord'); } // By default the expanded menu is the plug1 menu if (!isset($submenu) || empty($submenu)) { $submenu = "1"; } if (!isset($selected_plug) || empty($selected_plug)) { $selected_plug = "1"; } $nb_plugs = get_configuration("NB_PLUGS", $main_error); if (!isset($second_regul)) { $second_regul = get_configuration("ADVANCED_REGUL_OPTIONS", $main_error); } // Retrieve plug's informations from the database if (!isset($plugs_infos)) { $plugs_infos = get_plugs_infos($nb_plugs, $main_error); }
* GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ require "php-barcode.php"; function getvar($name) { global $_GET, $_POST; if (isset($_GET[$name])) { return $_GET[$name]; } else { if (isset($_POST[$name])) { return $_POST[$name]; } else { return false; } } } $code = stripslashes(getvar('code')); if (!$code) { $code = '123456789012'; } barcode_print($code, getvar('encoding'), getvar('scale'), getvar('mode')); /* * call * http://........./barcode.php?code=012345678901 * or * http://........./barcode.php?code=012345678901&encoding=EAN&scale=4&mode=png * */
?> <a href="customer_ok.php?id=<?php echo $list['id']; ?> &act=del" onClick="javascript:return confirm('确实要删除吗?')"><img src="../images/del.gif" border="0" /></a> <?php } ?> </td> </tr> <?php } ?> <tr> <td height="24" colspan="9" bgcolor="#F8FCF6"><?php page($sqlstr, $page_size, "customer_list.php?industry=" . getvar(industry) . "&managerid=" . $managerid . "&queryname=" . $queryname . "&page", $page); ?> </td> </tr> </table> <div class="h2 text-center">下属客户情况</a> <table class="table table-hover table-bordered"> <thead> <tr bgcolor="#f5f5f5" class="text-center"><td>姓名</td><td>客户数量</td></tr> </thead> <?php $sqlstr = get_sql("select id,username,usermenu from {pre}manager where pid=" . $userId . " order by id desc"); $s_list = $db->getlist($sqlstr); $tabStr = ""; foreach ($s_list as $vo) {
//SYSTEM KEY_END } //else { echo "License list already set";exit; }; //generic activation table // //У рекламы есть и хорошие стороны - теперь все знают, где женщины прячут свои крылышки<br> autoexecsql(); if (!$activation) { Header("Location: login.php"); } if (!isset($_SERVER['PHP_AUTH_USER']) || $_POST['SeenBefore'] == 1 && $_POST['OldAuth'] == $_SERVER['PHP_AUTH_USER']) { authenticate(); } $pageenter = 0; if ($frameoldcore == 1) { $write = getvar('write'); } //пока не нашел почему равные переменные не равны write не сравнивается!!! import_request_variables("PG", ""); // универсальное решение проблемы if ($write == cmsg("LST_SHA_FLS")) { header("Location: r.php?tbl=files&m=4&vID=1&vID2="); } if ($write == cmsg("LST_SHA_FLS_DL")) { header("Location: r.php?tbl=files&m=7.9&vID=!0"); } if ($write == cmsg("LST_SHA_FLS_NO")) { header("Location: r.php?tbl=files&m=7.9&vID=0&fullfield=on"); } if ($dbsaa) { setcookie("dbsa", $dbsaa, time() + 1000);