Commit c2b9faa3 authored by zhangkuanguang's avatar zhangkuanguang

删除更新

parent ef2b1824
...@@ -6,15 +6,15 @@ function register_globals_vars() { ...@@ -6,15 +6,15 @@ function register_globals_vars() {
$vars = $_REQUEST; $vars = $_REQUEST;
else {//GPC的顺序 else {//GPC��˳��
$vars = array_merge($_GET, $_POST, $_COOKIE); $vars = array_merge($_GET, $_POST, $_COOKIE);
} }
//1.去slashes //1.ȥ��slashes
$vars = stripslashes_arr($vars); $vars = stripslashes_arr($vars);
//2.注册全局变量 //2.ע��ȫ�ֱ���
for (reset($vars), $i = 0; $i < count($vars); $i++) { for (reset($vars), $i = 0; $i < count($vars); $i++) {
$key = key($vars); $key = key($vars);
GLOBAL $$key; GLOBAL $$key;
...@@ -24,7 +24,7 @@ function register_globals_vars() { ...@@ -24,7 +24,7 @@ function register_globals_vars() {
return $vars; return $vars;
} }
function stripslashes_arr($arr, $force_flag = 0) { //force_flag表示强制标 function stripslashes_arr($arr, $force_flag = 0) { //force_flag��ʾǿ�Ʊ�־
if ((get_magic_quotes_gpc() == 1) or ($force_flag)) { if ((get_magic_quotes_gpc() == 1) or ($force_flag)) {
while (list ($key, $val) = each($arr)) { while (list ($key, $val) = each($arr)) {
if (is_array($arr[$key])) { if (is_array($arr[$key])) {
...@@ -37,7 +37,7 @@ function stripslashes_arr($arr, $force_flag = 0) { //force_flag ...@@ -37,7 +37,7 @@ function stripslashes_arr($arr, $force_flag = 0) { //force_flag
return $arr; return $arr;
} }
function house_syn_tag($tbl,$houseid){//同步标签房源状态//ps:非多图房源,或失效、冻结时,标签也跟随自动失效 function house_syn_tag($tbl,$houseid){//ͬ����ǩ��Դ״̬//ps:�Ƕ�ͼ��Դ����ʧЧ������ʱ����ǩҲ�����Զ�ʧЧ
GLOBAL $house,$db,$dbback,$config_hitch,$statistics; GLOBAL $house,$db,$dbback,$config_hitch,$statistics;
if($config_hitch==1){ if($config_hitch==1){
...@@ -65,10 +65,10 @@ function house_syn_tag($tbl,$houseid){//同 ...@@ -65,10 +65,10 @@ function house_syn_tag($tbl,$houseid){//同
} }
function nowindow($id, $tbl,$uid){//同时取消橱窗 function nowindow($id, $tbl,$uid){//ͬʱȡ������
GLOBAL $db,$config_windows; GLOBAL $db,$config_windows;
if($config_windows==1){ if($config_windows==1){
//经纪人租售宝显示用于橱窗的积分 //���������۱���ʾ���ڳ����Ļ���
include_once(CORE_LIB . "/class_BrokerCredit.php"); include_once(CORE_LIB . "/class_BrokerCredit.php");
$I = new BrokerCredit($uid); $I = new BrokerCredit($uid);
...@@ -90,7 +90,7 @@ function nowindow($id, $tbl,$uid){//同时取 ...@@ -90,7 +90,7 @@ function nowindow($id, $tbl,$uid){//同时取
} }
//SESSION变量初始化 //SESSION������ʼ��
function set_account_session($row) { function set_account_session($row) {
global $web_auth, $conf_city; global $web_auth, $conf_city;
...@@ -112,7 +112,7 @@ function set_account_session($row) { ...@@ -112,7 +112,7 @@ function set_account_session($row) {
$_SESSION[$web_auth]["auth"] = $row["auth"] . ",base," . $row["add_auth"]; $_SESSION[$web_auth]["auth"] = $row["auth"] . ",base," . $row["add_auth"];
$_SESSION[$web_auth]["h_ok"] = $row["dist"] && $row["hotarea"] && $row["skill"]; $_SESSION[$web_auth]["h_ok"] = $row["dist"] && $row["hotarea"] && $row["skill"];
$_SESSION[$web_auth]["city"] = $conf_city; $_SESSION[$web_auth]["city"] = $conf_city;
$_SESSION[$web_auth]["is_pay"] = $row["is_pay"];//0表示付费、1表示非付费 $_SESSION[$web_auth]["is_pay"] = $row["is_pay"];//0��ʾ���ѡ�1��ʾ�Ǹ���
$_SESSION[$web_auth]["package_tag_num"] = $row["tag_num"]; $_SESSION[$web_auth]["package_tag_num"] = $row["tag_num"];
$_SESSION[$web_auth]["isstar_credit_upper_limit"] = $row["isstar_credit_upper_limit"]; $_SESSION[$web_auth]["isstar_credit_upper_limit"] = $row["isstar_credit_upper_limit"];
$_SESSION[$web_auth]["credit_upper_limit"] = $row["credit_upper_limit"]; $_SESSION[$web_auth]["credit_upper_limit"] = $row["credit_upper_limit"];
...@@ -121,7 +121,7 @@ function set_account_session($row) { ...@@ -121,7 +121,7 @@ function set_account_session($row) {
} }
//SESSION变量初始化 增加一个类给门店用 by luyang //SESSION������ʼ�� ����һ������ŵ��� by luyang
function set_account_session_agent($row) { function set_account_session_agent($row) {
global $web_auth, $conf_city; global $web_auth, $conf_city;
...@@ -143,7 +143,7 @@ function set_account_session_agent($row) { ...@@ -143,7 +143,7 @@ function set_account_session_agent($row) {
$_SESSION[$web_auth]["auth_for_agent"] = $row["auth"] . ",base," . $row["add_auth"]; $_SESSION[$web_auth]["auth_for_agent"] = $row["auth"] . ",base," . $row["add_auth"];
$_SESSION[$web_auth]["h_ok_for_agent"] = $row["dist"] && $row["hotarea"] && $row["skill"]; $_SESSION[$web_auth]["h_ok_for_agent"] = $row["dist"] && $row["hotarea"] && $row["skill"];
$_SESSION[$web_auth]["city_for_agent"] = $conf_city; $_SESSION[$web_auth]["city_for_agent"] = $conf_city;
$_SESSION[$web_auth]["is_pay_for_agent"] = $row["is_pay"];//0表示付费、1表示非付费 $_SESSION[$web_auth]["is_pay_for_agent"] = $row["is_pay"];//0��ʾ���ѡ�1��ʾ�Ǹ���
$_SESSION[$web_auth]["package_tag_num_for_agent"] = $row["package_tag_num"]; $_SESSION[$web_auth]["package_tag_num_for_agent"] = $row["package_tag_num"];
$_SESSION[$web_auth]["isstar_credit_upper_limit_for_agent"] = $row["isstar_credit_upper_limit"]; $_SESSION[$web_auth]["isstar_credit_upper_limit_for_agent"] = $row["isstar_credit_upper_limit"];
$_SESSION[$web_auth]["credit_upper_limit_for_agent"] = $row["credit_upper_limit"]; $_SESSION[$web_auth]["credit_upper_limit_for_agent"] = $row["credit_upper_limit"];
...@@ -152,7 +152,7 @@ function set_account_session_agent($row) { ...@@ -152,7 +152,7 @@ function set_account_session_agent($row) {
} }
//检测memcache黑名单 //���memcache������
function login_memcahe($username, $action = "add") { function login_memcahe($username, $action = "add") {
global $mc, $conf_city; global $mc, $conf_city;
if ($action == "add") { if ($action == "add") {
...@@ -172,16 +172,16 @@ function login_memcahe($username, $action = "add") { ...@@ -172,16 +172,16 @@ function login_memcahe($username, $action = "add") {
$ip = GetIP(); $ip = GetIP();
$mc->add($key, $ip, false, 3600); $mc->add($key, $ip, false, 3600);
} }
//echo "ip黑名单:".$mc->get($key); //echo "ip������:".$mc->get($key);
//$mc->delete($key); //$mc->delete($key);
} else { } else {
$mc->replace($key, $info + 1, false, 5); $mc->replace($key, $info + 1, false, 5);
//echo "加一次错误之后:".$mc->get($key); //echo "��һ�δ���֮��:".$mc->get($key);
} }
} else { } else {
$value = 1; $value = 1;
$mc->add($key, $value, false, 5); $mc->add($key, $value, false, 5);
//echo "初始化错误一次:".$mc->get($key); //echo "��ʼ������һ��:".$mc->get($key);
} }
} else if ($action == "check") { } else if ($action == "check") {
$key = $conf_city . "ip_" . $usernmae; $key = $conf_city . "ip_" . $usernmae;
...@@ -191,7 +191,7 @@ function login_memcahe($username, $action = "add") { ...@@ -191,7 +191,7 @@ function login_memcahe($username, $action = "add") {
} }
} }
//今日登陆次数过滤成一次 //���յ�½�������˳�һ��
function log_broker_login($kind, $uid){ function log_broker_login($kind, $uid){
global $web_auth,$db; global $web_auth,$db;
...@@ -216,7 +216,7 @@ function log_broker_login($kind, $uid){ ...@@ -216,7 +216,7 @@ function log_broker_login($kind, $uid){
} }
//检测登录函数 //����¼����
function user_login($d) { function user_login($d) {
GLOBAL $web_auth, $db, $auth_str, $conf_cityflag; GLOBAL $web_auth, $db, $auth_str, $conf_cityflag;
...@@ -226,49 +226,49 @@ function user_login($d) { ...@@ -226,49 +226,49 @@ function user_login($d) {
$row = $db->GetRow($q); $row = $db->GetRow($q);
if (empty($row)) { if (empty($row)) {
return 0; //登录名密码不对 return 0; //��¼�����벻��
} }
if ($row["valid_flag"] != "1") if ($row["valid_flag"] != "1")
return 2; //账号被禁用 return 2; //�˺ű�����
if ($row["expiredate"] < date("Y-m-d") && $row['groupid'] != VISITORS_GROUPID) if ($row["expiredate"] < date("Y-m-d") && $row['groupid'] != VISITORS_GROUPID)
return 3; //账号到期 return 3; //�˺ŵ���
if (!login_memcahe($d["username"], "check")) if (!login_memcahe($d["username"], "check"))
return 4; return 4;
//成功后的处理 //�ɹ���Ĵ���
//session_regenerate_id(TRUE); //session_regenerate_id(TRUE);
//处理刷新次数 沙羡 by 2012-8-30 //����ˢ�´��� ɳ�� by 2012-8-30
if($row['refresh'] != $row['grefresh'] ) { if($row['refresh'] != $row['grefresh'] ) {
//更新刷新次数 //����ˢ�´���
$query = " UPDATE `broker` SET refresh = '{$row['grefresh']}' WHERE uid= '{$row['uid']}' LIMIT 1"; $query = " UPDATE `broker` SET refresh = '{$row['grefresh']}' WHERE uid= '{$row['uid']}' LIMIT 1";
$query2 = " UPDATE `broker_refresh` SET refresh_single_limit = '{$row['grefresh']}' WHERE uid= '{$row['uid']}' LIMIT 1"; //$query2 = " UPDATE `broker_refresh` SET refresh_single_limit = '{$row['grefresh']}' WHERE uid= '{$row['uid']}' LIMIT 1";
$db->Execute($query); $db->Execute($query);
$db->Execute($query2); //$db->Execute($query2);
$row['refresh'] = $row['grefresh']; $row['refresh'] = $row['grefresh'];
unset($row['grefresh']); unset($row['grefresh']);
} }
set_account_session($row); set_account_session($row);
//过滤重复登陆写日 //�����ظ���½д��־
log_broker_login("brokercp", $row['uid']); log_broker_login("brokercp", $row['uid']);
//经纪人登录加积分 //�����˵�¼�ӻ���
include_once(CORE_LIB."/class_brokercredit.php"); include_once(CORE_LIB."/class_brokercredit.php");
$I = new BrokerCredit($_SESSION[$web_auth]["uid"]); $I = new BrokerCredit($_SESSION[$web_auth]["uid"]);
$I->dealCredit('plus_login'); $I->dealCredit('plus_login');
if ($row['groupid'] == 1) if ($row['groupid'] == 1)
echo "<script>alert(\"您的账户功能使用受到限制\");</script>"; echo "<script>alert(\"�����˻�����ʹ���ܵ�����\");</script>";
else if ($row["expiredate"] < date("Y-m-d", strtotime("+1 weeks"))) else if ($row["expiredate"] < date("Y-m-d", strtotime("+1 weeks")))
echo "<script>alert(\"您的账户即将到期,请续费!\");</script>"; echo "<script>alert(\"�����˻��������ڣ������ѣ�\");</script>";
return 1; return 1;
} }
//Fisher 2013-5-22 V3.5经纪人发布房源删除房源进行记 //Fisher 2013-5-22 V3.5�����˷�����Դɾ����Դ���м�¼
function broker_actionlog($tbl,$rowid,$msg) function broker_actionlog($tbl,$rowid,$msg)
{ {
GLOBAL $db,$web_auth; GLOBAL $db,$web_auth;
...@@ -278,7 +278,7 @@ function broker_actionlog($tbl,$rowid,$msg) ...@@ -278,7 +278,7 @@ function broker_actionlog($tbl,$rowid,$msg)
$ss["agentcode"]=$_SESSION[$web_auth]["companycode"]; $ss["agentcode"]=$_SESSION[$web_auth]["companycode"];
$ss["uid"] =$_SESSION[$web_auth]["uid"]; $ss["uid"] =$_SESSION[$web_auth]["uid"];
$ss["tbl"] =$tbl; $ss["tbl"] =$tbl;
$ss["msg"] =$msg; //0:删除房源 1:新增有效房源 2:新增失效效房源 3:房源再发布 4:失效房 $ss["msg"] =$msg; //0:ɾ����Դ 1:������Ч��Դ 2:����ʧЧЧ��Դ 3:��Դ�ٷ��� 4:ʧЧ��Դ
$ss["y"] =date('Y'); $ss["y"] =date('Y');
$ss["m"] =date('m'); $ss["m"] =date('m');
$ss["d"] =date('d'); $ss["d"] =date('d');
...@@ -300,19 +300,19 @@ function broker_actionlog($tbl,$rowid,$msg) ...@@ -300,19 +300,19 @@ function broker_actionlog($tbl,$rowid,$msg)
} }
/* /*
* @use 改变经纪人,房源,图片状态 * @use �ı侭����,��Դ,ͼƬ״̬
* @param $field 状态字段名称 * @param $field ״̬�ֶ�����
* @param $oldState 改变前的状态值 * @param $oldState �ı�ǰ��״ֵ̬
* @param $newState 改变后的状态值 * @param $newState �ı���״ֵ̬
* @param $primaryKey 归属的外键字段 * @param $primaryKey ����������ֶ�
* @param $primaryKeyArr 所有归属的 * @param $primaryKeyArr ���й�����ֵ
*/ */
function changeState($tableName, $field, $newState, $primaryKey, $primaryKeyArr, $sys = '') { function changeState($tableName, $field, $newState, $primaryKey, $primaryKeyArr, $sys = '') {
global $db; global $db;
$primaryKeyStrs = is_array($primaryKeyArr) ? implode(',', $primaryKeyArr) : ''; $primaryKeyStrs = is_array($primaryKeyArr) ? implode(',', $primaryKeyArr) : '';
//同步修改 2013-3-14 //ͬ���޸� 2013-3-14
$moreupdatesql = $tableName == "sell" && $field == "esta" && $newState != 1 ? ",nofee=0" : ""; $moreupdatesql = $tableName == "sell" && $field == "esta" && $newState != 1 ? ",nofee=0" : "";
if ($primaryKeyStrs) { if ($primaryKeyStrs) {
...@@ -354,7 +354,7 @@ if(!function_exists('get_rentinfo_url')) { ...@@ -354,7 +354,7 @@ if(!function_exists('get_rentinfo_url')) {
if(!function_exists('jumpto')) if(!function_exists('jumpto'))
{ {
function jumpto($url, $message = "执行完毕!", $sec = 1000, $template = "jump_page") function jumpto($url, $message = ����ϣ�", $sec = 1000, $template = "jump_page")
{ {
$page_text = $message; $page_text = $message;
require(Template($template)); require(Template($template));
...@@ -363,7 +363,7 @@ if(!function_exists('jumpto')) ...@@ -363,7 +363,7 @@ if(!function_exists('jumpto'))
} }
} }
//算出两时间的差 //�����ʱ��IJ�ֵ
function get_days($date1, $date2) { function get_days($date1, $date2) {
$d1 = strtotime($date1); $d1 = strtotime($date1);
$d2 = strtotime($date2); $d2 = strtotime($date2);
...@@ -371,7 +371,7 @@ function get_days($date1, $date2) { ...@@ -371,7 +371,7 @@ function get_days($date1, $date2) {
return $days; return $days;
} }
//时间格式转换函数 //ʱ���ʽת������
function to_dhm($str) { function to_dhm($str) {
$d = $str / 24 / 3600; $d = $str / 24 / 3600;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment