Example #1
0
 $keyword = str_replace("%", '\\%', $keyword);
 $keyword = str_replace("_", '\\_', $keyword);
 if (!$keyword) {
     showerr("关键字不能为空!");
 }
 if ($Fid_db[tableid] && !$fid) {
     showerr("请选择一个栏目!");
 }
 /*每页显示50条*/
 $rows = 50;
 if (!$page) {
     $page = 1;
 }
 $min = ($page - 1) * $rows;
 /*没指定模块或模块辅信息表不存在时,将搜索所有信息*/
 if (!$mid || !is_table("{$_pre}content_{$mid}")) {
     showerr('没有指定的模型!');
 } else {
     if ($keyword) {
         if ($type && table_field("{$_pre}content_{$mid}", $type)) {
             $field = "B.{$type}";
         } elseif ($type == 'username') {
             $field = "A.username";
         } else {
             if ($mid == 1) {
                 $field = "A.title";
             } elseif ($mid == 2) {
                 $field = "B.truename";
             }
         }
         $_SQL = " {$field} LIKE '%{$keyword}%' ";
Example #2
0
 }
 if (!is_dir(ROOT_PATH . "{$postdb['dirname']}/{$postdb['admindir']}")) {
     showerr("后台目录不存在" . ROOT_PATH . "{$postdb['dirname']}/{$postdb['admindir']}");
 }
 if (!is_writable(ROOT_PATH . "{$postdb['dirname']}/data/")) {
     showerr(ROOT_PATH . "{$postdb['dirname']}/data/" . "目录不可写");
 }
 $db->query("UPDATE {$pre}module SET name='{$postdb['name']}',dirname='{$postdb['dirname']}',admindir='{$postdb['admindir']}',domain='{$postdb['domain']}',list='{$postdb['list']}',adminmember='{$postdb['adminmember']}',ifclose='{$postdb['ifclose']}',ifsys='{$postdb['ifsys']}' WHERE id='{$id}'");
 make_module_cache();
 @extract($db->get_one("SELECT pre AS Mpre,id AS Mid,type AS Type FROM `{$pre}module` WHERE id='{$id}' "));
 if ($Type) {
     $table = "{$pre}{$Mpre}config";
 } else {
     $table = "{$pre}{$Mpre}_config";
 }
 if (!is_table($table)) {
     jump("修改成功!", "index.php?lfj=module&job=list", 1);
 }
 if (!is_writable(ROOT_PATH . "{$postdb['dirname']}/data/config.php")) {
     showerr(ROOT_PATH . "{$postdb['dirname']}/data/config.php" . "文件不可写");
 }
 $db->query("DELETE FROM `{$table}` WHERE c_key='module_id'");
 $db->query("DELETE FROM `{$table}` WHERE c_key='module_pre'");
 $db->query("DELETE FROM `{$table}` WHERE c_key='module_close'");
 $db->query("INSERT INTO `{$table}` ( `c_key` , `c_value` , `c_descrip` ) VALUES ('module_id', '{$Mid}', '')");
 $db->query("INSERT INTO `{$table}` ( `c_key` , `c_value` , `c_descrip` ) VALUES ('module_pre', '{$Mpre}', '')");
 $db->query("INSERT INTO `{$table}` ( `c_key` , `c_value` , `c_descrip` ) VALUES ('module_close', '{$postdb['ifclose']}', '')");
 $writefile = "<?php\r\n";
 $query = $db->query("SELECT * FROM `{$table}`");
 while ($rs = $db->fetch_array($query)) {
     $rs[c_value] = addslashes($rs[c_value]);
Example #3
0
    $lfjdb[C][endtime] = '长期有效';
}
if (ereg("^pwbbs", $webdb[passport_type]) && !is_array($db_modes)) {
    @extract($db->get_one("SELECT COUNT(*) AS pmNUM FROM {$TB_pre}msg WHERE `touid`='{$lfjuid}' AND type='rebox' AND ifnew=1"));
} elseif (ereg("^dzbbs", $webdb[passport_type])) {
    if ($webdb[passport_type] == 'dzbbs7') {
        $pmNUM = uc_pm_checknew($lfjuid);
    } else {
        @extract($db->get_one("SELECT COUNT(*) AS pmNUM FROM {$TB_pre}pms WHERE `msgtoid`='{$lfjuid}' AND folder='inbox' AND new=1"));
    }
} else {
    @extract($db->get_one("SELECT COUNT(*) AS pmNUM FROM `{$pre}pm` WHERE `touid`='{$lfjuid}' AND type='rebox' AND ifnew='1'"));
}
unset($fusername, $fuid, $vname, $vuid, $GuestbookNum, $CommentNum, $Lognum, $PhotoNum);
//是否整合博客
if (is_table("{$pre}blog_home")) {
    $useblog = 1;
    //extract($db->get_one("SELECT fuid,fusername FROM {$pre}blog_friend WHERE uid='$lfjuid' ORDER BY id DESC LIMIT 1"));
    extract($db->get_one("SELECT visitor FROM {$pre}blog_home WHERE uid='{$lfjuid}' "));
    $detail = explode("\r\n", $visitor);
    foreach ($detail as $key => $value) {
        list($vuid, $vname, $vtime) = explode("\t", $value);
        if ($vuid) {
            break;
        }
    }
    extract($db->get_one(" SELECT COUNT(*) AS GuestbookNum FROM {$pre}blog_guestbook WHERE cuid='{$lfjuid}' "));
    extract($db->get_one(" SELECT COUNT(*) AS CommentNum FROM {$pre}blog_comments WHERE cuid='{$lfjuid}' "));
    extract($db->get_one(" SELECT COUNT(*) AS Lognum FROM {$pre}blog_log_article WHERE uid='{$lfjuid}' "));
    extract($db->get_one(" SELECT COUNT(*) AS PhotoNum FROM {$pre}blog_photo_pic WHERE uid='{$lfjuid}' "));
} else {
Example #4
0
 } else {
     $type = 1;
 }
 $array[field_db][my_content] = array("title" => "附注", "field_name" => "my_content", "field_type" => "mediumtext", "form_type" => "textarea", "search" => "0");
 $array[is_html][my_content] = "附注";
 if (is_file(ROOT_PATH . 'template/default/list_tpl/mod_tpl.htm')) {
     $array[tpldb]['list'] = 'template/default/list_tpl/mod_tpl.htm';
 }
 $config = serialize($array);
 $db->query("INSERT INTO {$pre}article_module (name,alias,config,iftable) VALUES ('{$name}','{$name}','{$config}','{$tableid}') ");
 @extract($db->get_one("SELECT id FROM {$pre}article_module ORDER BY id DESC LIMIT 0,1"));
 unset($SQL);
 if ($dbcharset && mysql_get_server_info() > '4.1') {
     $SQL = " DEFAULT CHARSET={$dbcharset} ";
 }
 if ($iftable && !is_table("{$pre}article{$tableid}")) {
     $rs = $db->get_one("SHOW CREATE TABLE {$pre}article ");
     $sql = str_replace(array("{$pre}article", ";"), array("{$pre}article{$tableid}", ""), $rs['Create Table']);
     if (mysql_get_server_info() > '4.1') {
         if (!strstr($sql, 'DEFAULT CHARSET')) {
             $sql .= $SQL;
         }
     }
     if (eregi("AUTO_INCREMENT=", $sql)) {
         $sql = preg_replace("/AUTO_INCREMENT=([0-9]+)/is", "AUTO_INCREMENT=" . $tableid . "000001 ", $sql);
     } else {
         $sql .= " AUTO_INCREMENT=" . $tableid . "000001  ";
     }
     $db->query($sql);
     $sql = "ALTER TABLE `{$pre}article{$tableid}` CHANGE `aid` `aid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ";
     $db->query($sql);
Example #5
0
 if (is_table("{$_pre}module")) {
     $select_module = "<select name='moduleid'>";
     $query = $db->query("SELECT * FROM {$_pre}module ORDER BY id DESC");
     while ($rs = $db->fetch_array($query)) {
         $ck = $rs[id] == $codedb[moduleid] ? ' selected ' : ' ';
         $select_module .= "<option value='{$rs['id']}' {$ck}>{$rs['name']}</option>";
     }
     $select_module .= "</select>";
 }
 @extract($db->get_one("SELECT COUNT(*) AS SORTNUM FROM {$_pre}sort"));
 if ($SORTNUM < 2000) {
     update_class(0, 0);
     $select_sort = $Guidedb->Checkbox("{$_pre}sort", 'fiddb[]', explode(",", $fiddb));
 }
 //万能文章有辅栏目,要特别处理
 if (($_typefid == 'spfid' || $_typefid != 'fid' && $typefid == 'spfid') && is_table("{$_pre}special")) {
     $select_sort = $Guidedb->Checkbox("{$_pre}spsort", 'fiddb[]', explode(",", $fiddb));
     $ck_typefid[spfid] = ' checked ';
 } else {
     $ck_typefid[fid] = ' checked ';
 }
 $tplpart_1 = str_replace("&nbsp;", "&amp;nbsp;", $tplpart_1);
 $tplpart_2 = str_replace("&nbsp;", "&amp;nbsp;", $tplpart_2);
 //$getLabelTpl=getLabelTpl('info',array("common_title","common_pic","common_content","common_fname"));
 $getLabelTpl = getLabelTpl($inc, array("common_title", "common_pic", "common_content", "common_fname", "common_zh_title", "common_zh_pic", "common_zh_content"));
 //幻灯片样式
 $rollpicStyle = "<select name='RollStyleType' id='RollStyleType' onChange='rollpictypes(this)'><option value=''>默认</option>";
 $dir = opendir(ROOT_PATH . "template/default/rollpic/");
 while ($file = readdir($dir)) {
     if (eregi("\\.htm\$", $file)) {
         $rollpicStyle .= "<option value='{$file}'>" . str_replace(".htm", "", $file) . "</option>";
         if (is_table($file)) {
             load_file($path . $file, $aConfig, $oDB);
         }
     }
     // Load SPs
     $path = $base_path . "sp/";
     $aFileList = scandir($path);
     foreach ($aFileList as $file) {
         if (is_sp($file)) {
             load_file($path . $file, $aConfig, $oDB);
         }
     }
     // Load sample data
     load_file($base_path . "test_data.sql", $aConfig, $oDB);
 } else {
     if (is_table($filename)) {
         if (file_exists(realpath($filename))) {
             $filenamepath = realpath($filename);
         } else {
             if (file_exists(realpath($base_path . "schema/" . $filename))) {
                 $filenamepath = realpath($base_path . "schema/" . $filename);
             } else {
                 echo "Not found!\n";
                 exit;
             }
         }
         $table_name = basename($filenamepath, ".sql");
         $table_name = str_ireplace("tb_", "", $table_name);
         if (table_exists($oDB, $aConfig, $table_name)) {
             echo "\nWARNING: table [{$table_name}] in [{$mysql_dbase}] exists!\n";
             echo "Drop/recreate? (yes/no): ";
Example #7
0
    get_admin_html('table');
} elseif ($action == 'table') {
    if ($tableid == '0') {
        showerr("分表名不能为0!");
    }
    if ($tableid0 == $tableid) {
        showerr("提交失败,原分表名不能与新表名雷同!");
    }
    if ($page < 2) {
        if ($tableid != '' && !ereg("^([a-z0-9]{1,30})\$", $tableid)) {
            showerr("分表名不符合规则");
        }
        if ($dbcharset && mysql_get_server_info() > '4.1') {
            $SQL = " DEFAULT CHARSET={$dbcharset} ";
        }
        if ($tableid != '' && !is_table("{$_pre}content{$tableid}")) {
            $rs = $db->get_one("SHOW CREATE TABLE {$_pre}content ");
            $sql = str_replace(array("{$_pre}content", ";"), array("{$_pre}content{$tableid}", ""), $rs['Create Table']);
            if (mysql_get_server_info() > '4.1') {
                if (!strstr($sql, 'DEFAULT CHARSET')) {
                    $sql .= $SQL;
                }
            }
            $db->query($sql);
        }
        $db->query("UPDATE `{$_pre}sort` SET tableid='{$tableid}' WHERE fid='{$fid}'");
        fid_cache();
    }
    if (!$page) {
        $page = 1;
    }
Example #8
0
function pm_msgbox($array)
{
    global $db, $pre, $timestamp, $webdb, $TB_pre, $TB, $userDB, $db_modes;
    $array[content] = addslashes($array[content]);
    $array[title] = addslashes($array[title]);
    if (ereg("^pwbbs", $webdb[passport_type]) && !is_array($db_modes)) {
        if (strlen($array[title]) > 130) {
            showerr("±êÌâ²»ÄÜ´óÓÚ65¸öºº×Ö");
        }
        if (is_table("{$TB_pre}msgc")) {
            $db->query("INSERT INTO {$TB_pre}msg (`touid`,`fromuid`, `username`, `type`, `ifnew`, `mdate`) VALUES ('{$array['touid']}','{$array['fromuid']}', '{$array['fromer']}', 'rebox', '1', '{$timestamp}')");
            $mid = $db->insert_id();
            $db->query("INSERT INTO {$TB_pre}msgc (`mid`, `title`, `content`) VALUES ('{$mid}','{$array['title']}','{$array['content']}')");
        } else {
            $db->query("INSERT INTO {$TB_pre}msg (`touid`,`fromuid`, `username`, `type`, `ifnew`, `title`, `mdate`, `content`) VALUES ('{$array['touid']}','{$array['fromuid']}', '{$array['fromer']}', 'rebox', '1', '{$array['title']}', '{$timestamp}', '{$array['content']}')");
        }
        $array = array('uid' => $array[touid], 'newpm' => 1);
        $userDB->edit_pw_member($array);
    } elseif (defined("UC_CONNECT")) {
        if (strlen($array[title]) > 75) {
            showerr("±êÌâ²»ÄÜ´óÓÚ32¸öºº×Ö");
        }
        uc_pm_send('$array[fromuid]', '$array[touid]', '$array[title]', '$array[content]', 1, 0, 1);
    } else {
        if (strlen($array[title]) > 130) {
            showerr("±êÌâ²»ÄÜ´óÓÚ65¸öºº×Ö");
        }
        $db->query("INSERT INTO `{$pre}pm` (`touid`,`fromuid`, `username`, `type`, `ifnew`, `title`, `mdate`, `content`) VALUES ('{$array['touid']}','{$array['fromuid']}', '{$array['fromer']}', 'rebox', '1', '{$array['title']}', '{$timestamp}', '{$array['content']}')");
    }
}
Example #9
0
 function list_class($name, $fid)
 {
     if (!is_table($this->table_class)) {
         return false;
     }
     $show = "<select name='{$name}'>";
     $listdb = $this->list_classdb(0);
     foreach ($listdb as $rs) {
         $ck = $rs[fid] == $fid ? ' selected ' : '';
         $show .= "<option value='{$rs['fid']}' {$ck}>{$rs['name']}</option>";
     }
     $show .= "</select>";
     return $show;
 }
Example #10
0
<?php

require dirname(__FILE__) . "/" . "global.php";
if (!$lfjid) {
    showerr("你还没登录");
}
if (defined("UC_CONNECT")) {
    uc_pm_location($lfjuid);
    exit;
}
if (ereg("^pwbbs", $webdb[passport_type]) && !is_array($db_modes)) {
    if (is_table("{$TB_pre}msgc")) {
        $newpw = 1;
    } else {
        $newpw = 0;
    }
}
$linkdb = array("收件箱" => "?job=list", "写新消息" => "?job=send", "清空收件箱" => "?job=clean");
if ($job == 'list') {
    if (!$page) {
        $page = 1;
    }
    $rows = 20;
    $min = ($page - 1) * $rows;
    if (ereg("^pwbbs", $webdb[passport_type]) && !is_array($db_modes)) {
        if ($newpw) {
            $SQL = "SELECT A.*,B.* FROM {$TB_pre}msg A LEFT JOIN {$TB_pre}msgc B ON A.mid=B.mid WHERE A.`touid`='{$lfjuid}' AND A.type='rebox' ORDER BY A.mid DESC LIMIT {$min},{$rows}";
        } else {
            $SQL = "SELECT * FROM {$TB_pre}msg WHERE `touid`='{$lfjuid}' AND type='rebox' ORDER BY mid DESC LIMIT {$min},{$rows}";
        }
        $showpage = getpage("{$TB_pre}msg", "WHERE `touid`='{$lfjuid}' AND type='rebox'", "?job={$job}", $rows);
Example #11
0
        jump("执行完毕", $returnto);
    }
    jump("执行完毕", "index.php?lfj=center&job=map");
} elseif ($job == "module" && $Apower[center_config]) {
    require dirname(__FILE__) . "/" . "head.php";
    require dirname(__FILE__) . "/" . "template/center/menu.htm";
    require dirname(__FILE__) . "/" . "template/center/module.htm";
    require dirname(__FILE__) . "/" . "foot.php";
} elseif ($job == "map") {
    $systemMsg = systemMsg();
    $OfficialNotice = read_file(ROOT_PATH . "cache/OfficialNotice.txt");
    @extract($db->get_one("SELECT COUNT(aid) AS Article FROM {$pre}article_db"));
    @extract($db->get_one("SELECT COUNT(cid) AS Comment FROM {$pre}comment"));
    @extract($db->get_one("SELECT COUNT(aid) AS Article0 FROM {$pre}article WHERE yz=0"));
    @extract($db->get_one("SELECT COUNT(cid) AS Comment0 FROM {$pre}comment WHERE yz=0"));
    is_table("{$pre}guestbook_content") && @extract($db->get_one("SELECT COUNT(id) AS Guestbook FROM {$pre}guestbook_content"));
    $Member = $userDB->total_num();
    //require("head.php");
    if (!strstr(preg_replace("/http:\\/\\/(www\\.|)(.*)/is", "\\2", $WEBURL), preg_replace("/http:\\/\\/(www\\.|)(.*)/is", "\\2", $webdb[www_url])) && $webdb[www_url] != '/.') {
        echo '<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />';
        echo "<CENTER><A HREF='index.php?lfj=center&job=config' style='color:red;font-size:25px;'>严重警告,你设置的“整站访问网址”有误,请点击重新设置</A></CENTER>";
        exit;
    }
    if (!strstr($WEBURL, $webdb[admin_url])) {
        echo '<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />';
        echo "<CENTER><A HREF='index.php?lfj=center&job=config' style='color:red;font-size:25px;'>严重警告,你设置的“后台访问网址”有误,请点击重新设置</A></CENTER>";
        exit;
    }
    unset($dirdb);
    $dirdb[] = "data";
    $dirdb[] = "data/group";
Example #12
0
 $hothits || ($hothits = 30);
 $rolltime || ($rolltime = 3);
 $_rolltype[$rolltype] = ' selected ';
 $div_width && ($div_w = $div_width);
 $div_height && ($div_h = $div_height);
 $yzdb[$yz] = "checked";
 $ascdb[$asc] = "checked";
 $orderdb[$order] = " selected ";
 $levelsdb[$levels] = " selected ";
 $titleflooddb["{$titleflood}"] = "checked";
 $hidedb[$hide] = "checked";
 $divtpldb[$DivTpl] = "checked";
 $stypedb[$stype] = " checked ";
 $fiddb = $codedb[fiddb];
 //$select_news=$Guidedb->Checkbox("{$cDB[sort]}",'fiddb[]',$fiddb);
 if (is_table("{$_pre}module")) {
     $select_module = "<select name='moduleid'><option value=''>请选择</option>";
     $query = $db->query("SELECT * FROM {$_pre}module ORDER BY id DESC");
     while ($rs = $db->fetch_array($query)) {
         $ck = $rs[id] == $codedb[moduleid] ? ' selected ' : ' ';
         $select_module .= "<option value='{$rs['id']}' {$ck}>{$rs['name']}</option>";
     }
     $select_module .= "</select>";
 }
 @extract($db->get_one("SELECT COUNT(*) AS SORTNUM FROM {$_pre}sort"));
 if ($SORTNUM < 2000) {
     update_class(0, 0);
     $select_sort = $Guidedb->Checkbox("{$_pre}sort", 'fiddb[]', $fiddb);
 }
 $ck_typefid[fid] = ' checked ';
 $tplpart_1 = str_replace("&nbsp;", "&amp;nbsp;", $tplpart_1);
Example #13
0
         $SQL .= " AND A.posttime>'{$starttijd}' AND A.posttime<'{$eindtijd}'";
     } else {
         showerr("时间格式不对");
     }
 }
 if ($starttijd) {
     $starttijd = preg_replace("/([\\d]+)-([\\d]+)-([\\d]+) ([\\d]+):([\\d]+):([\\d]+)/eis", "mk_time('\\4','\\5', '\\6', '\\2', '\\3', '\\1')", $starttijd);
     $SQL .= " AND A.posttime>'{$starttijd}'";
 }
 if ($eindtijd) {
     $eindtijd = preg_replace("/([\\d]+)-([\\d]+)-([\\d]+) ([\\d]+):([\\d]+):([\\d]+)/eis", "mk_time('\\4','\\5', '\\6', '\\2', '\\3', '\\1')", $eindtijd);
     $SQL .= " AND A.posttime<'{$eindtijd}'";
 }
 //搜索按照时间来处理-结束
 $search_url = '';
 if ($mid && is_table("{$pre}article_content_{$mid}")) {
     $erp = $article_moduleDB[$mid][iftable] ? $article_moduleDB[$mid][iftable] : '';
     foreach ($postdb as $key => $value) {
         if ($value && table_field("{$pre}article_content_{$mid}", $key)) {
             $SQL .= " AND C.`{$key}`='{$value}' ";
             $rsdb[$key][$value] = " selected ";
             $search_module = 1;
         }
         $value = urlencode($value);
         $search_url .= "&postdb[{$key}]={$value}";
     }
 }
 if ($page < 1) {
     $page = 1;
 }
 $min = ($page - 1) * $rows;
Example #14
0
function SetModule_config()
{
    global $inc, $typesystem, $db, $pre;
    if (!$typesystem) {
        return;
    }
    $_inc = str_replace("Info_", "", $inc);
    $rsdb = $db->get_one("SELECT * FROM {$pre}module WHERE pre='{$_inc}'");
    if (!$rsdb) {
        return;
    }
    if ($rsdb[type]) {
        $_pre = "{$pre}{$_inc}";
    } else {
        $_pre = "{$pre}{$_inc}_";
    }
    if (!is_table("{$_pre}config") || !is_table("{$_pre}sort")) {
        return;
    }
    $module_array = unserialize($rsdb[config]);
    $query = $db->query("SELECT * FROM {$_pre}config");
    while ($rs = $db->fetch_array($query)) {
        $cf[$rs[c_key]] = $rs[c_value];
    }
    $module_array[list_PhpName] = 'list.php?&fid=$fid';
    $module_array[show_PhpName] = 'bencandy.php?&fid=$fid&id=$id';
    if (!$rsdb[type]) {
        $__iic = ucfirst($_inc);
        $module_array[MakeHtml] = $cf["{$__iic}_NewsMakeHtml"];
        $module_array[list_HtmlName1] = $cf["{$__iic}_list_filename"];
        $module_array[show_HtmlName1] = $cf["{$__iic}_bencandy_filename"];
        $module_array[list_HtmlName2] = $cf["{$__iic}_list_filename2"];
        $module_array[show_HtmlName2] = $cf["{$__iic}_bencandy_filename2"];
    } else {
        $module_array[MakeHtml] = $cf[Info_NewsMakeHtml];
        $module_array[list_HtmlName1] = $cf[Info_list_filename];
        $module_array[show_HtmlName1] = $cf[Info_bencandy_filename];
        $module_array[list_HtmlName2] = $cf[Info_list_filename2];
        $module_array[show_HtmlName2] = $cf[Info_bencandy_filename2];
    }
    $query = $db->query("SELECT * FROM {$_pre}sort");
    while ($rs = $db->fetch_array($query)) {
        $rs[list_html] && ($module_array[list_HtmlName][$rs[fid]] = $rs[list_html]);
        $rs[bencandy_html] && ($module_array[show_HtmlName][$rs[fid]] = $rs[bencandy_html]);
    }
    $string = addslashes(serialize($module_array));
    $db->query("UPDATE {$pre}module SET config='{$string}' WHERE pre='{$_inc}'");
    make_module_cache();
}
Example #15
0
<?php

!function_exists('html') && exit('ERR');
//当前文件是注册时通过手机或邮箱获取注册码的功能
if (!is_table("{$pre}regnum")) {
    $db->query("CREATE TABLE `{$pre}regnum` (\n\t`sid` varchar( 8 ) NOT NULL default '',\n\t`num` varchar( 6 ) NOT NULL default '',\n\t`posttime` int( 10 ) NOT NULL default '0',\n\tUNIQUE KEY `sid` ( `sid` ) ,\n\tKEY `posttime` ( `num` , `posttime` ) \n\t) TYPE = HEAP");
}
if (!$webdb[yzNumReg]) {
    showerr('系统没开放这个功能!');
}
$time = $timestamp - 60;
if ($db->get_one("SELECT * FROM {$pre}regnum WHERE sid='{$usr_sid}' AND posttime>{$time}")) {
    showerr("如果你的注册码还没有收到的话?请一分钟后再重发!");
}
$sms = rands(4);
$content = $webdb['webname'] . "提供给您的注册码是:(" . $sms . ")这四位数";
if ($webdb[yzNumReg] == 2) {
    if (!ereg("^1([0-9]{10})\$", $num)) {
        showerr('手机号码有误!' . $num);
    }
    if (sms_send($num, $sms)) {
        $db->query("REPLACE INTO `{$pre}regnum` ( `sid` , `num` , `posttime` ) VALUES ('{$usr_sid}', '{$sms}', '{$timestamp}')");
        showerr("信息已经成功发送到您指定的手机号码中,请注意查收,有可能会延迟几分钟,请耐心等待!", 1);
    } else {
        showerr("信息发送失败,可能是手机短信接口有问题!");
    }
} elseif ($webdb[yzNumReg] == 1) {
    $email = $num;
    $title = $webdb['webname'] . "提供给你的注册码信息";
    if (send_mail($email, $title, $content, $ifcheck = 1)) {
        $db->query("REPLACE INTO `{$pre}regnum` ( `sid` , `num` , `posttime` ) VALUES ('{$usr_sid}', '{$sms}', '{$timestamp}')");
Example #16
0
<?php

require dirname(__FILE__) . "/" . "global.php";
//安装有店铺的情况
if (is_table("{$pre}hy_company")) {
    if (!$db->get_one("SELECT * FROM `{$pre}hy_company` WHERE uid='{$lfjuid}'")) {
        echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL={$webdb['www_url']}/hy/member/post_company.php'>";
        exit;
    }
    echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL={$webdb['www_url']}/hy/member/homepage_ctrl.php?atn=info'>";
    exit;
} else {
    showerr('你没有安装黄页模块');
}
Example #17
0
     }
 }
 if ($_POST[keyword] && $_COOKIE[searchTime]) {
     showerr("3秒钟内,请不要重复提交查询");
 }
 setcookie("searchTime", 1, $timestamp + 3);
 $SQL = " 1 ";
 if ($type == 'id') {
     $SQL .= " AND A.id = '{$keyword}' ";
 } elseif ($type == 'username') {
     $SQL .= " AND BINARY A.username = '******' ";
 } elseif ($type && $mid && is_table("{$_pre}content_{$mid}") && table_field("{$_pre}content_{$mid}", $type)) {
     $SQL .= " AND BINARY C.{$type} LIKE '%{$keyword}%' ";
     $search_module = 1;
 }
 if ($mid && is_table("{$_pre}content_{$mid}")) {
     $search_url = '';
     foreach ($postdb as $key => $value) {
         if ($value != '' && table_field("{$_pre}content_{$mid}", $key)) {
             $SQL .= " AND C.`{$key}`='{$value}' ";
             $rsdb[$key][$value] = " selected ";
             $search_module = 1;
         }
         $value = urlencode($value);
         $search_url .= "&postdb[{$key}]={$value}";
     }
 }
 if ($page < 1) {
     $page = 1;
 }
 $min = ($page - 1) * $rows;