コード例 #1
0
ファイル: phonelist.class.php プロジェクト: TiMoChao/xingfu
 function saveInfo($arrData, $intModify = 0, $isAlert = true, $isLastID = false)
 {
     global $arrGWeb;
     $arr = array();
     $arr = check::SqlInjection($this->saveTableFieldG($arrData));
     if ($intModify == 0) {
         if ($this->insertInfo($arr)) {
             if ($isAlert) {
                 check::Alert("恭喜你,订阅成功!系统将返回到首页", $arrGWeb['WEB_ROOT_pre'] . '/index.php');
             } else {
                 return true;
             }
         } else {
             if ($isAlert) {
                 check::Alert("订阅失败", -1);
             } else {
                 return false;
             }
         }
     } else {
         if ($this->updateInfo($arr)) {
             if ($isAlert) {
                 check::Alert("退订成功!系统将返回到首页", $arrGWeb['WEB_ROOT_pre'] . '/index.php');
             } else {
                 return true;
             }
         } else {
             if ($isAlert) {
                 check::Alert("退订失败", $arrGWeb['WEB_ROOT_pre'] . '/index.php');
             } else {
                 return false;
             }
         }
     }
 }
コード例 #2
0
 /**
  * 保存信息内容
  * @author	肖飞
  * @param	int $arrData    信息信息数组
  * @return  void
  */
 function saveInfo($arrData, $intModify = 0, $isAlert = true)
 {
     $arr = array();
     $arr = check::SqlInjection($this->saveTableFieldG($arrData));
     if ($intModify == 0) {
         if (!empty($_SESSION['user_id'])) {
             $arr['user_id'] = intval($_SESSION['user_id']);
         }
         if ($this->insertInfo($arr)) {
             if ($isAlert) {
                 check::Alert("预约成功,我们会尽快通知您,祝您生活愉快", -1);
             }
             check::AlertExit("", $arrGWeb['WEB_ROOT_pre'] . "/xingfu_apply/");
         } else {
             check::Alert("发布失败", -1);
         }
     } else {
         if ($this->updateInfo($arr)) {
             check::Alert("修改成功!");
         } else {
             check::Alert("修改失败");
         }
     }
 }
コード例 #3
0
ファイル: sms_sender.php プロジェクト: TiMoChao/xingfu
                        if ($strReturnCode == "5") {
                            check::Alert("手机号或发送信息不能为空", -1);
                        } else {
                            if ($strReturnCode == "6") {
                                check::Alert("超过每次提交100个号码的下发限制!", -1);
                            } else {
                                if ($strReturnCode == "7") {
                                    check::Alert("超过XX个字,请修改后发送!", -1);
                                } else {
                                    if ($strReturnCode == "8") {
                                        check::Alert("用户已冻结,请联系客服人员", -1);
                                    } else {
                                        if ($strReturnCode == "0009") {
                                            check::Alert("参数无效!", -1);
                                        } else {
                                            check::Alert("未知错误!", -1);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
$objSms = new BizSMS();
$objSms->setParam($yx_arrMBizParam);
$message = $objSms->getMsgInfo();
$objSms->setParam($arrMBizParam);
コード例 #4
0
ファイル: php_common.php プロジェクト: TiMoChao/xingfu
 /**
  * 信息入库保存
  * @author	肖飞
  * @param	int $arrData		信息信息数组
  * @param	int $intModify	是否修改
  * @param	int $isAlert		是否出警告提示
  * @param	int $isLastID		是否返回最后ID
  * @return  void
  */
 public function saveInfo($arrData, $intModify = 0, $isAlert = true, $isLastID = false)
 {
     //非法信息过滤
     @(include_once __WEB_ROOT . '/data/illegal.inc.php');
     if (!empty($arrGIllegal) && !empty($arrData['intro'])) {
         foreach ($arrGIllegal as $k => $v) {
             if ($v['pass'] == 1) {
                 $arrData['intro'] = str_ireplace($k, $v['replace'], $arrData['intro']);
                 if (!empty($arrData['title'])) {
                     $arrData['title'] = str_ireplace($k, $v['replace'], $arrData['title']);
                 }
                 if (!empty($arrData['summary'])) {
                     $arrData['summary'] = str_ireplace($k, $v['replace'], $arrData['summary']);
                 }
             }
         }
     }
     //关键词广告
     @(include_once __WEB_ROOT . '/data/keywords.inc.php');
     if (!empty($arrGKeywords) && !empty($arrData['intro'])) {
         //原有链接的去除链接
         foreach ($arrGKeywords as $k => $v) {
             if ($v['pass'] == 1) {
                 $arrData['intro'] = preg_replace('/(<a.*?>\\s*)(' . $k . ')(\\s*<\\/a>)/sui', '${2}', $arrData['intro']);
             }
         }
         //重新加上链接
         foreach ($arrGKeywords as $k => $v) {
             if ($v['pass'] == 1) {
                 $arrData['intro'] = str_ireplace($k, "<a class=keyad target=_blank href={$v['url']}>{$k}</a>", $arrData['intro']);
             }
         }
     }
     $arr = check::SqlInjection($this->saveTableFieldG($arrData));
     if ($intModify == 0) {
         if (array_key_exists('user_id', $arr) && empty($arr['user_id'])) {
             $arr['user_id'] = intval($_SESSION['user_id']);
         }
         if ($this->insertInfo($arr)) {
             if ($isAlert) {
                 check::Alert('发布成功!');
             }
             if ($isLastID) {
                 return $this->lastInsertIdG();
             } else {
                 return true;
             }
         } else {
             if ($isAlert) {
                 check::Alert('发布失败!');
             }
             return false;
         }
     }
     if ($intModify == 1) {
         if ($this->updateInfo($arr) !== false) {
             if ($isAlert) {
                 check::Alert('修改成功!');
             }
             return true;
         } else {
             if ($isAlert) {
                 check::Alert('修改失败!');
             }
             return false;
         }
     }
     if ($intModify == 2) {
         if ($this->replaceInfo($arr)) {
             if ($isAlert) {
                 check::Alert('发布成功!');
             }
             return true;
         } else {
             if ($isAlert) {
                 check::Alert('发布失败!');
             }
             return false;
         }
     }
 }
コード例 #5
0
ファイル: systemset.php プロジェクト: TiMoChao/xingfu
            }
        }
    }
    foreach ($_POST as $k => $v) {
        if ($k == 'WEB_ROOT_pre') {
            if (!empty($v) && $v[0] != '/') {
                $v = '/' . $v;
            }
        }
        $arrGWeb[$k] = $v;
    }
    $somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
    if (!($handle = fopen($strFilename, 'w'))) {
        check::AlertExit("错误:不能打开文件 {$strFilename} !", -1);
    }
    // 将$somecontent写入到我们打开的文件中。
    if (fwrite($handle, $somecontent) === FALSE) {
        check::AlertExit("错误:不能写入到文件 {$strFilename} !", -1);
    }
    fclose($handle);
    @set_time_limit(0);
    check::delTreeDirs('../..' . $arrTemp['cache_url'] . '/', false);
    check::delTreeDirs($arrTemp['cache_dir'], false);
    check::delTreeDirs($arrTemp['compile_dir'], false);
    check::Alert("成功地写入到文件 {$strFilename} !");
}
// 输出到模板
$arrMOutput["smarty_assign"]['strNav'] = '网站信息设置管理';
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'siteset/systemset.htm';
$objWebInit->output($arrMOutput);
コード例 #6
0
ファイル: user.class.php プロジェクト: TiMoChao/lc_ad_first
 /**
  * 保存会员信息
  * @author	肖飞
  * @param	int $arrData    新闻信息数组
  * @return  void
  */
 function saveInfo($arrData, $intModify = 0)
 {
     $arr = array();
     unset($arrData['password_c']);
     unset($arrData['Submit']);
     unset($arrData['agree']);
     $arr = check::SqlInjection($this->saveTableFieldG($arrData));
     if ($intModify == 0) {
         return $this->insertUser($arr);
     } else {
         if ($this->updateUser($arr)) {
             check::Alert("修改成功!");
         } else {
             check::Alert("修改失败");
         }
     }
 }
コード例 #7
0
ファイル: postnew.php プロジェクト: TiMoChao/lc_ad_first
    }
    $objQQWry =& new QQWry();
    $objQQWry->qqwry($strIP);
    $strZone = iconv('GB2312', 'UTF-8' . '//TRANSLIT', $objQQWry->Country);
    $_POST['zone'] = $strZone;
    $_POST['reply'] = array();
    if ($_POST['summary'] == '') {
        $_POST['summary'] = check::csubstr(trim(str_replace("&nbsp;", " ", str_replace("\r\n", "", strip_tags($_POST['intro'])))), 0, 100);
    }
    if (!array_key_exists('title', $_POST)) {
        $_POST['title'] = $_POST['titleprefix'] . $_POST['longtitle'];
    }
    unset($_POST['titleprefix']);
    unset($_POST['longtitle']);
    if ($_POST['title'] != '') {
        $_POST['title_md5'] = md5($_POST['title']);
    }
    //判断文章信息
    $arrTemp = $objWebInit->getInfoList("where title_md5='{$_POST['title_md5']}' and user_id = '{$_SESSION['user_id']}' and type_id='{$_POST['type_id']}'", "", 0, 1);
    if ($arrTemp['COUNT_ROWS'] != 0) {
        check::AlertExit("错误:相同的信息请不要重复发布!需要刷新排列的话,请登录会员中心使用列表下方“提前”选项!", -1);
    }
    $objWebInit->saveInfo($_POST, 0);
    if ($arrGWeb['URL_static']) {
        check::Alert("", $arrGWeb['WEB_ROOT_pre'] . "/ask/index.php");
    } else {
        check::AlertExit("请先完善提问信息", $arrGWeb['WEB_ROOT_pre'] . "/ask/index.php");
    }
} else {
    check::AlertExit('对不起,新问题的内容不能为空!', -1);
}
コード例 #8
0
ファイル: user.class.php プロジェクト: TiMoChao/xingfu
 /**
  * 保存会员信息
  * @author	肖飞
  * @param	int $arrData    数组
  * @param	int $intModify    是否修改
  * @param	bool $isAlert    数组
  * @param	bool $isLastID    数组
  * @return  void
  */
 function saveInfo($arrData, $isModify = false, $isAlert = true, $isMcenter = false)
 {
     if ($isMcenter) {
         $strData = check::getAPIArray($arrData);
         if (!($intUserID = check::getAPI('mcenter', 'saveInfo', "{$strData}^{$isModify}^false"))) {
             if ($isAlert) {
                 check::AlertExit("与用户中心通讯失败,请稍后再试!", -1);
             }
             return 0;
         }
     }
     $arr = array();
     $arr = check::SqlInjection($this->saveTableFieldG($arrData, $isModify));
     if ($isModify == 0) {
         if (!empty($intUserID)) {
             $arr['user_id'] = $intUserID;
         }
         if ($this->insertUser($arr)) {
             if (!empty($intUserID)) {
                 return $intUserID;
             } else {
                 return $this->lastInsertIdG();
             }
         } else {
             if ($blAlert) {
                 check::Alert("新增失败");
             }
             return false;
         }
     } else {
         if ($this->updateUser($arr) !== false) {
             if ($isAlert) {
                 check::Alert("修改成功!");
             } else {
                 return true;
             }
         } else {
             if ($blAlert) {
                 check::Alert("修改失败");
             }
             return false;
         }
     }
 }
コード例 #9
0
ファイル: email_sender.php プロジェクト: TiMoChao/xingfu
            $objShared->set('emaillog', ++$intSendNum);
            $mail->MsgHTML($_POST['intro']);
            $mail->AddAddress($v, substr($v, 0, strpos($v, '@')));
            $intKey++;
            if ($intKey == $_POST['type_id']) {
                $intKey = 0;
                try {
                    $mail->Send();
                    $mail->ClearAllRecipients();
                } catch (Exception $e) {
                }
            }
        }
        if ($intKey != 0) {
            try {
                $mail->Send();
            } catch (Exception $e) {
            }
        }
        $mail->ClearAllRecipients();
        $mail->ClearAttachments();
        check::Alert("发送完毕!", -1);
    }
    //exit;
}
// 输出到模板
$arrMOutput["smarty_assign"]['strNav'] = 'Email按照设定发送';
$arrMOutput["smarty_assign"]['arrMsmtp'] = $arrMsmtp[0];
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'email/email_sender.htm';
$objWebInit->output($arrMOutput);
コード例 #10
0
                        $rs->execute();
                        $arrData = $rs->fetchAll(PDO::FETCH_COLUMN);
                        foreach ($arrData as $key => $val) {
                            $strDir = ceil($val / $arrGCache['cache_filenum']);
                            if ($arrGWeb['URL_static']) {
                                if ($arrGWeb['file_static']) {
                                    $strUrl = $domain . '/' . $arrGWeb['cache_url'] . '/' . $k . '-' . $strDir . '/' . $val . $arrGWeb['file_suffix'];
                                } else {
                                    $strUrl = $domain . '/' . $k . '/detail/id-' . $val . $arrGWeb['file_suffix'];
                                }
                            } else {
                                $strUrl = $domain . '/' . $k . '/detail.php?id=' . $val;
                            }
                            $smi = new google_sitemap_item($strUrl, $today, $_POST['content_changefreq'], $_POST['content_priority']);
                            $sm->add_item($smi);
                        }
                        break;
                }
            }
        }
        $sm->build($sm_file);
        check::Alert('Google Sitemaps 生成成功,http://' . $arrGWeb['host'] . '/sitemap.xml');
    } else {
        check::AlertExit("错误:文件 http://" . $arrGWeb['host'] . "/sitemap.xml 不可写!", -1);
    }
}
// 输出到模板
$arrMOutput["smarty_assign"]['strNav'] = 'Google Sitemaps';
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'seo/google_sitemap.htm';
$objWebInit->output($arrMOutput);
コード例 #11
0
ファイル: mcenter.class.php プロジェクト: TiMoChao/xingfu
 /**
  * 保存会员信息
  * @author	肖飞
  * @param	int $arrData    数组
  * @param	int $intModify    是否修改
  * @param	bool $isAlert    数组
  * @param	bool $isLastID    数组
  * @return  void
  */
 function saveInfo($arrData, $isModify = false, $isAlert = true)
 {
     $arr = array();
     $arr = check::SqlInjection($this->saveTableFieldG($arrData, $isModify));
     if ($isModify == 0) {
         return $this->insertUser($arr);
     } else {
         if ($this->updateUser($arr) !== false) {
             if ($isAlert) {
                 check::Alert("修改成功!");
             }
             return true;
         } else {
             if ($blAlert) {
                 check::Alert("修改失败!");
             }
             return false;
         }
     }
 }
コード例 #12
0
ファイル: vir.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 会员栏目二星会员mail验证文件文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	user
 */
require_once 'config/config.inc.php';
require_once "class/user.class.php";
$objWebInit = new user();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
$objWebInit->db();
$strWhere = " and nike_name = '{$_GET['b']}'";
if ($objWebInit->updateUserGrade(2, $_GET['a'], $strWhere)) {
    check::Alert("邮件验证成功!");
}
// 输出到模板
//$arrMOutput["smarty_debug"] = false;
//print_r($_REQUEST);
//$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'].'templats/index1.html';
//$objWebInit->output($arrMOutput);
コード例 #13
0
ファイル: sql_restore.php プロジェクト: TiMoChao/xingfu
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
$objWebInit->db();
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'r', 'backup')) {
    check::AlertExit('对不起,您没有读权限', -1);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'x', 'backup')) {
        check::AlertExit('对不起,您没有执行权限', -1);
    }
    if (empty($_FILES['Filedata']['name'])) {
        check::AlertExit("必须上传.sql文件 !", -1);
    }
    $strFileExt = strtolower(strrchr($_FILES['Filedata']['name'], '.'));
    if ($strFileExt != '.sql') {
        check::AlertExit("仅支持SQL文件 !", -1);
    }
    @set_time_limit(0);
    $sql_file = $_FILES['Filedata']['tmp_name'];
    if ($objWebInit->import($sql_file)) {
        check::Alert('数据库导入成功!');
    } else {
        check::AlertExit('数据库导入失败!', -1);
    }
}
// 输出到模板
$arrMOutput["smarty_assign"]['strNav'] = '数据还原';
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'backup/sql_restore.htm';
$objWebInit->output($arrMOutput);
コード例 #14
0
ファイル: php_common.php プロジェクト: TiMoChao/lc_ad_first
 /**
  * 保存信息内容
  * @author	肖飞
  * @param	int $arrData    信息信息数组
  * @return  void
  */
 function saveInfo($arrData, $intModify = 0, $blAlert = true)
 {
     //非法信息过滤
     @(include_once __WEB_ROOT . '/data/illegal.inc.php');
     if (!empty($arrGIllegal) && !empty($arrData['intro'])) {
         foreach ($arrGIllegal as $k => $v) {
             if ($v['pass'] == 1) {
                 $arrData['intro'] = str_replace($k, $v['replace'], $arrData['intro']);
                 if (!empty($arrData['title'])) {
                     $arrData['title'] = str_replace($k, $v['replace'], $arrData['title']);
                 }
                 if (!empty($arrData['summary'])) {
                     $arrData['summary'] = str_replace($k, $v['replace'], $arrData['summary']);
                 }
             }
         }
     }
     //关键词广告
     @(include_once __WEB_ROOT . '/data/keywords.inc.php');
     if (!empty($arrGKeywords) && !empty($arrData['intro'])) {
         foreach ($arrGKeywords as $k => $v) {
             if ($v['pass'] == 1) {
                 $arrData['intro'] = str_replace('<A class=keyad target=_blank href=\\"' . $v['url'] . '\\">' . $k . '</A>', $k, $arrData['intro']);
                 $arrData['intro'] = str_replace('<A class=keyad href=\\"' . $v['url'] . '\\" target=_blank>' . $k . '</A>', $k, $arrData['intro']);
                 $arrData['intro'] = str_replace('<a class=keyad href=\\"' . $v['url'] . '\\" target=_blank>' . $k . '</a>', $k, $arrData['intro']);
                 $arrData['intro'] = str_replace($k, "<a class=keyad target=_blank href={$v['url']}>{$k}</a>", $arrData['intro']);
             }
         }
     }
     $arr = check::SqlInjection($this->saveTableFieldG($arrData));
     if ($intModify == 0) {
         if (array_key_exists('user_id', $arr)) {
             $arr['user_id'] = intval($_SESSION['user_id']);
         }
         if ($this->insertInfo($arr)) {
             if ($blAlert) {
                 check::Alert('发布成功!');
             }
         } else {
             if ($blAlert) {
                 check::Alert('发布失败!');
             }
         }
     }
     if ($intModify == 1) {
         if ($this->updateInfo($arr)) {
             if ($blAlert) {
                 check::Alert('修改成功!');
             }
         } else {
             if ($blAlert) {
                 check::Alert('修改失败!');
             }
         }
     }
     if ($intModify == 2) {
         if ($this->replaceInfo($arr)) {
             if ($blAlert) {
                 check::Alert('发布成功!');
             }
         } else {
             if ($blAlert) {
                 check::Alert('发布失败!');
             }
         }
     }
 }