Example #1
0
<?php

require "mysql_class.php";
$db_test = new DB();
$select = "SELECT * FROM sage_user aa, sage_acl bb where aa.user_id = bb.user_id;";
// open DB
$db_test->db_connect();
// select
$query = $db_test->db_select($select);
for ($i = 0; $i < sizeof($query); $i++) {
    $ergebnis = $query[$i];
    echo $ergebnis->loginname . " " . $ergebnis->surname . " " . $ergebnis->read_path . "<br>";
}
// close db
$db_test->db_close();
Example #2
0
//$openid = '0002';
// 判断微信是否已确认绑定
$flag = $_GET['flag'];
if ($flag == 1) {
    $sql = "update t_hs_wechat set FType = 1 where FWechatID='{$openid}'";
    $db->execsql($sql);
}
$sql_type = "select FType,FNumber from t_hs_wechat where FWechatID='{$openid}'";
$res_type = $db->getrow($sql_type);
// var_dump($res_type);die;
if (count($res_type) == 0) {
    //没有记录
    //echo 2; // 请先在PC端绑定微信号
    echo "<p>您的微信ID为:<b>" . $openid . "</b></p>";
    echo "请先在PC端绑定微信号";
    $db->db_close();
    die;
} elseif ($res_type['FType'] == 0) {
    //echo 0; // 显示确认界面
    $fnumber = $res_type['FNumber'];
    $sql = "select a.FName, b.FName,c.FName from t_hs_employee as a inner join t_hs_company as b on a.FCompanyID == b.FID inner join \n\t  t_hs_section as c on a.FSectionID == c.FID where a.FNumber == '" . $fnumber . "'";
    $res = $db->get_num_row($sql);
    if (count($res) > 0) {
        echo "<p>姓名:" . $res[0] . "</p>";
        echo "<p>所属公司:" . $res[1] . "</p>";
        echo "<p>所属部门:" . $res[2] . "</p>";
        echo "<script language='javascript'>function verify(){window.location.href='wechat-SAE.php?flag=1';}</script>";
        echo "<p><input type=button value='确认绑定' onclick='verify()' ><p>";
        $db->db_close();
        die;
    }
Example #3
0
    $last_clear = $query->row['last_cache_clear'];
}
if (isset($last_clear) && $LOC->now > $last_clear) {
    $expire = $LOC->now + 60 * 60 * 24 * 7;
    $DB->query("UPDATE exp_stats SET last_cache_clear = '{$expire}' WHERE site_id = '" . $DB->escape_str($PREFS->ini('site_id')) . "' AND weblog_id = '0'");
    if ($PREFS->ini('enable_throttling') == 'y') {
        $expire = time() - 180;
        $DB->query("DELETE FROM exp_throttle WHERE last_activity < {$expire}");
    }
    $FNS->clear_spam_hashes();
    $FNS->clear_caching('all');
}
// ----------------------------------
//  Close database connection
// -----------------------------------
$DB->db_close();
// END OF SYSTEM EXECUTION
/*
=====================================================
 Benchmark Class
-----------------------------------------------------
 Purpose: This class can calculate
 the time difference between any two marked points.
 Multiple mark points can be captured.
=====================================================
 CODE EXAMPLE:
    
 $BM = new Benchmark();
 $BM->mark('FIRST_MARK');
 // Some code happens here
 $BM->mark('SECOND_MARK');