public static function getFileContent($file)
 {
     if (!file_exists($file)) {
         showMsg($file . ' not exist');
     }
     return file_get_contents($file);
 }
Example #2
0
 function __construct($modtype)
 {
     $this->name = $modtype;
     $this->db = $GLOBALS['dsql'];
     $query = "SELECT * FROM #@__member_model WHERE name='{$modtype}'";
     $diyinfo = $this->db->getone($query);
     if (!is_array($diyinfo)) {
         showMsg('参数不正确,该会员模型不存在', 'javascript:;');
         exit;
     }
     $etypes = array();
     $egroups = array();
     $this->db->Execute('me', 'SELECT * FROM `#@__stepselect` ORDER BY id desc');
     while ($arr = $this->db->GetArray()) {
         $etypes[] = $arr;
         $egroups[$arr['egroup']] = $arr['itemname'];
     }
     $this->egroups = $egroups;
     $this->modid = $diyinfo['id'];
     $this->table = $diyinfo['table'];
     $this->description = $diyinfo['description'];
     $this->state = $diyinfo['state'];
     $this->issystem = $diyinfo['issystem'];
     $this->info = $diyinfo['info'];
 }
Example #3
0
function checkLogined($return = false)
{
    $boolean = isset($_SESSION['uid']) && $_SESSION['uid'];
    if ($return) {
        return $boolean;
    } else {
        if (!$boolean) {
            showMsg('请登录系统', url('member', 'login'));
            exit;
        }
    }
}
Example #4
0
 /**
  *  析构函数
  *
  * @access    public
  * @param     string  $diyid  自定义表单ID
  * @return    string
  */
 function __construct($diyid)
 {
     $this->diyid = $diyid;
     $this->db = $GLOBALS['dsql'];
     $query = "SELECT * FROM #@__diyforms WHERE diyid='{$diyid}'";
     $diyinfo = $this->db->GetOne($query);
     if (!is_array($diyinfo)) {
         showMsg('参数不正确,该自定义表单不存在', 'javascript:;');
         exit;
     }
     $this->info = $diyinfo['info'];
     $this->name = $diyinfo['name'];
     $this->table = $diyinfo['table'];
     $this->public = $diyinfo['public'];
     $this->listTemplate = $diyinfo['listtemplate'] != '' && file_exists(DEDETEMPLATE . '/plus/' . $diyinfo['listtemplate']) ? $diyinfo['listtemplate'] : 'list_diyform.htm';
     $this->viewTemplate = $diyinfo['viewtemplate'] != '' && file_exists(DEDETEMPLATE . '/plus/' . $diyinfo['viewtemplate']) ? $diyinfo['viewtemplate'] : 'view_diyform.htm';
     $this->postTemplate = $diyinfo['posttemplate'] != '' && file_exists(DEDETEMPLATE . '/plus/' . $diyinfo['posttemplate']) ? $diyinfo['posttemplate'] : 'post_diyform.htm';
 }
Example #5
0
 function __construct($diyid)
 {
     $this->diyid = $diyid;
     $this->db = $GLOBALS['dsql'];
     $query = "select * from #@__diyforms where diyid='{$diyid}'";
     $diyinfo = $this->db->getone($query);
     if (!is_array($diyinfo)) {
         showMsg('参数不正确,该自定义表单不存在', 'javascript:;');
         exit;
     }
     $this->info = $diyinfo['info'];
     $this->name = $diyinfo['name'];
     $this->table = $diyinfo['table'];
     $this->public = $diyinfo['public'];
     $this->listTemplate = $diyinfo['listtemplate'] != '' && file_exists(DEDEINC . '/../templets/plus/' . $diyinfo['listtemplate']) ? $diyinfo['listtemplate'] : 'list_diyform.htm';
     $this->viewTemplate = $diyinfo['viewtemplate'] != '' && file_exists(DEDEINC . '/../templets/plus/' . $diyinfo['viewtemplate']) ? $diyinfo['viewtemplate'] : 'view_diyform.htm';
     $this->postTemplate = $diyinfo['posttemplate'] != '' && file_exists(DEDEINC . '/../templets/plus/' . $diyinfo['posttemplate']) ? $diyinfo['posttemplate'] : 'post_diyform.htm';
 }
 public function __construct($db, $bakDir, $dbConfig)
 {
     $this->bakDir = $bakDir;
     $this->db = $db;
     $this->dbConfig = $dbConfig;
     $dbName = $dbConfig['database'];
     $sqlFiles = glob($bakDir . $dbName . "_*.sql");
     if (count($sqlFiles) < 1) {
         showMsg('bak files unexist');
     }
     foreach ($sqlFiles as $k => $v) {
         list($d, $t, $thetime, $id) = explode("_", substr(basename($v), 0, -4));
         $arrfile[$k] = $thetime;
     }
     asort($arrfile);
     $all_count = array_count_values($arrfile);
     $maxtime = array_pop($arrfile);
     $this->sqlFilesNum = $all_count[$maxtime];
     $this->sqlFilePrefix = $bakdir . $dbName . "_" . date('Ymd', $maxtime) . "_" . $maxtime;
 }
Example #7
0
<?php 
checkLogined();
if (isset($_POST['submit'])) {
    if ($_POST['text'] == "") {
        echo "请输入内容";
    } else {
        $sql = mysql_connect("localhost", "root", "") or die("连接失败1");
        mysql_select_db("php_msg") or die("连接失败2");
        mysql_query("SET NAMES 'utf8'");
        $newsid = $_POST['newsid'];
        $content = $_POST['text'];
        $date = date("y-m-d H:i");
        $sql = "INSERT INTO `php_msg`.`com` ( `newsid`, `content`,`dates`)\n        VALUES ( '{$newsid}', '{$content}', '{$date}')";
        mysql_query($sql);
        echo "<script>alert('评论成功');window.location.href='index.php?mod=article&do=view&aid=" . $newsid . "'</script>";
    }
}
showMsg('发布成功', url('article'), 'success');
Example #8
0
File: vod.php Project: klarclm/sgv
 $tpl->P['cp'] = 'voddown';
 $tpl->P['cn'] = $tpl->P['id'] . '-' . $tpl->P['src'] . '-' . $tpl->P['num'];
 echoPageCache($tpl->P['cp'], $tpl->P['cn']);
 $db = new AppDb($MAC['db']['server'], $MAC['db']['user'], $MAC['db']['pass'], $MAC['db']['name']);
 $sql = "SELECT * FROM {pre}vod WHERE d_hide=0 AND d_id=" . $tpl->P['id'];
 $row = $db->getRow($sql);
 if (!$row) {
     showMsg("获取数据失败,请勿非法传递参数", MAC_PATH);
 }
 if (!getUserPopedom($row["d_type"], "down")) {
     showMsg("您没有权限浏览播放页", MAC_PATH . "index.php?m=user-index.html");
 }
 if ($MAC['user']['status'] == 1) {
     $uid = intval($_SESSION['userid']);
     if ($row["d_stint"] > 0 && $uid == 0) {
         showMsg("此为收费数据请先登录再观看", MAC_PATH . "index.php?m=user-index.html");
     }
     $rowu = $db->getRow("SELECT * FROM {pre}user where u_id=" . $uid);
     if ($rowu) {
         $stat = false;
         $upoint = $rowu["u_points"];
         $downf = "," . $tpl->P['id'] . "-" . $tpl->P['src'] . "-" . $tpl->P['num'] . ",";
         if ($rowu["u_flag"] == 1) {
             if (time() >= $rowu["u_end"]) {
                 $msg = "对不起,您的会员时间已经到期,请联系管理员续费!";
             }
         } elseif ($rowu["u_flag"] == 2) {
             if ($rowu["u_start"] >= $rowu["u_ip"] && $rowu["u_ip"] <= $rowu["u_end"]) {
                 $stat = true;
             }
             if (!$stat) {
Example #9
0
 S::gp(array('schctl', 'config', 'hotwordsconfig', 'view', 'new_view'));
 $schctl['schstart'] > 23 && ($schctl['schstart'] = 0);
 $schctl['schend'] > 23 && ($schctl['schend'] = 0);
 $config['opensch'] = $schctl['opensch'] . "\t" . $schctl['schstart'] . "\t" . $schctl['schend'];
 $config['maxresult'] = intval($config['maxresult']);
 $config['schwait'] = intval($config['schwait']);
 //		$config['hotwords'] = trim($config['hotwords']);
 $config['filterids'] = trim($config['filterids']);
 $config['operate_log'] = (array) $config['operate_log'];
 $config['search_type_expand'] = (array) $config['search_type_expand'];
 $config['openbuildattachs'] = $config['openbuildattachs'];
 if ($config['operate_log'] && array_diff($config['operate_log'], array('log_forums', 'log_threads', 'log_posts', 'log_diarys', 'log_members', 'log_colonys'))) {
     showMsg("抱歉,操作行为记录类型不存在");
 }
 if ($config['search_type_expand'] && array_diff($config['search_type_expand'], array('cms', 'diary', 'group'))) {
     showMsg("抱歉,搜索类型扩展不存在");
 }
 if ($config['filterids']) {
     $filterids = explode(",", $config['filterids']);
     foreach ($filterids as $id) {
         $id = intval($id);
         if ($id < 1) {
             adminmsg('搜索过滤版块ID不能为字符');
         }
     }
     $config['filterids'] = implode(',', $filterids);
 }
 $temp = $tempHotwords = array();
 $query = $db->query(" SELECT * FROM pw_searchhotwords ORDER BY vieworder ASC");
 while ($rt = $db->fetch_array($query)) {
     $temp['keyword'] = $rt['keyword'];
Example #10
0
     $pages = numofpage($sum, $page, $numofpage, "forumcp.php?action=edit&type=reward&fid={$fid}&{$url_a}");
     $threaddb = array();
     $query = $db->query("SELECT t.tid,t.fid,t.subject,t.author,t.authorid,t.postdate,r.cbtype,r.cbval,r.catype,r.caval FROM pw_threads t LEFT JOIN pw_reward r USING(tid) WHERE t.fid=" . S::sqlEscape($fid) . " AND t.special='3' AND t.state='0' AND r.timelimit>" . S::sqlEscape($timestamp) . $sql . " ORDER BY t.postdate {$limit}");
     while ($rt = $db->fetch_array($query)) {
         $rt['postdate'] = get_date($rt['postdate'], 'Y-m-d');
         $rt['cbtype'] = is_numeric($rt['cbtype']) ? $_CREDITDB[$rt['cbtype']][0] : ${'db_' . $rt['cbtype'] . 'name'};
         $rt['catype'] = is_numeric($rt['catype']) ? $_CREDITDB[$rt['catype']][0] : ${'db_' . $rt['catype'] . 'name'};
         $rt['binfo'] = $rt['cbval'] . "&nbsp;" . $rt['cbtype'];
         $rt['ainfo'] = $rt['caval'] . "&nbsp;" . $rt['catype'];
         $threaddb[] = $rt;
     }
     require_once PrintEot('forumcp');
     footer();
 } elseif ($type == 'thread') {
     if (!$isGM && $forumcp_type['allowtpctype'] == 0) {
         showMsg('您没有管理权限!');
     }
     S::gp(array('starttime', 'endtime', 'username', 't_type'));
     S::gp(array('page'), 'GP', 2);
     $page < 1 && ($page = 1);
     $limit = "LIMIT " . ($page - 1) * $db_perpage . ",{$db_perpage}";
     $sql = $url_a = '';
     $_POST['starttime'] && ($starttime = PwStrtoTime($starttime));
     $_POST['endtime'] && ($endtime = PwStrtoTime($endtime));
     if ($username) {
         $sql .= ' AND author=' . S::sqlEscape($username);
         $url_a .= "username="******"&";
     }
     if ($starttime) {
         $sql .= ' AND postdate>' . S::sqlEscape($starttime);
         $url_a .= "starttime={$starttime}&";
function showInfo($msg = '', $url = 'back', $isexit = false)
{
    return showMsg($msg, $url, '', false, '提示信息', $isexit, 2);
}
Example #12
0
             return;
         }
     }
     $upcache = true;
     break;
 case "art_topic":
     $col = "t_id";
     $ids = be("get", "t_id");
     if (isN($ids)) {
         $ids = be("arr", "t_id");
     }
     $arr = explode(',', $ids);
     foreach ($arr as $a) {
         $cc = $db->getOne('select count(*) from {pre}art_relation where r_type=2 and r_a=' . $a);
         if ($cc > 0) {
             showMsg('请先删除本专题下面的视频', '');
             return;
         }
     }
     $upcache = true;
     break;
 case "gbook":
     $col = "g_id";
     $ids = be("get", "g_id");
     if (isN($ids)) {
         $ids = be("arr", "g_id");
     }
     break;
 case "manager":
     $col = "m_id";
     $ids = be("get", "m_id");
Example #13
0
 if ($validate == '' || $validate != $svali) {
     ShowMsg("验证码不正确!", "");
     exit;
 }
 $ip = GetIP();
 $dtime = time();
 $uname = trimMsg($uname);
 $email = trimMsg($email);
 $homepage = trimMsg($homepage);
 $homepage = preg_replace("#http:\\/\\/#", '', $homepage);
 $qq = trimMsg($qq);
 $msg = trimMsg(cn_substrR($msg, 1024), 1);
 $tid = empty($tid) ? 0 : intval($tid);
 $reid = empty($reid) ? 0 : intval($reid);
 if ($msg == '' || $uname == '') {
     showMsg('你的姓名和留言内容不能为空!', '-1');
     exit;
 }
 $title = HtmlReplace(cn_substrR($title, 60), 1);
 if ($title == '') {
     $title = '无标题';
 }
 if ($reid != 0) {
     $row = $dsql->GetOne("SELECT msg FROM `#@__guestbook` WHERE id='{$reid}' ");
     $msg = "<div class=\\'rebox\\'>" . addslashes($row['msg']) . "</div>\n" . $msg;
 }
 $query = "INSERT INTO `#@__guestbook`(title,tid,mid,uname,email,homepage,qq,face,msg,ip,dtime,ischeck)\r\n                  VALUES ('{$title}','{$tid}','{$g_mid}','{$uname}','{$email}','{$homepage}','{$qq}','{$img}','{$msg}','{$ip}','{$dtime}','{$needCheck}'); ";
 $dsql->ExecuteNoneQuery($query);
 $gid = $dsql->GetLastID();
 if ($needCheck == 1) {
     require_once DEDEINC . "/oxwindow.class.php";
Example #14
0
File: art.php Project: klarclm/sgv
    $valarr = array($tpl->P["des"], $tpl->P["key"], $tpl->P["pg"], $tpl->P["order"], $tpl->P["by"], $tpl->P["wd"], urlencode($tpl->P["wd"]), $tpl->P["pinyin"], $tpl->P["letter"], $tpl->P['typeid'], $tpl->P['typepid']);
    $tpl->H = str_replace($colarr, $valarr, $tpl->H);
    unset($colarr, $valarr);
    $linktype = $tpl->getLink('art', 'search', '', array('typeid' => $tpl->P['typepid']));
    $linkletter = $tpl->getLink('art', 'search', '', array('letter' => ''));
    $linkorderasc = $tpl->getLink('art', 'search', '', array('order' => 'asc'));
    $linkorderdesc = $tpl->getLink('art', 'search', '', array('order' => 'desc'));
    $linkbytime = $tpl->getLink('art', 'search', '', array('by' => 'time'));
    $linkbyhits = $tpl->getLink('art', 'search', '', array('by' => 'hits'));
    $linkbyscore = $tpl->getLink('art', 'search', '', array('by' => 'score'));
    $tpl->H = str_replace(array('{page:linkletter}', '{page:linktype}', '{page:linkorderasc}', '{page:linkorderdesc}', '{page:linkbytime}', '{page:linkbyhits}', '{page:linkbyscore}'), array($linkletter, $linktype, $linkorderasc, $linkorderdesc, $linkbytime, $linkbyhits, $linkbyscore), $tpl->H);
    $_SESSION["last_artsearchtime"] = time();
} elseif ($method == 'detail') {
    $tpl->C["siteaid"] = 26;
    $tpl->P['cp'] = 'art';
    $tpl->P['cn'] = $tpl->P['id'] . '-' . $tpl->P['pg'];
    echoPageCache($tpl->P['cp'], $tpl->P['cn']);
    $db = new AppDb($MAC['db']['server'], $MAC['db']['user'], $MAC['db']['pass'], $MAC['db']['name']);
    $sql = "SELECT * FROM {pre}art WHERE a_hide=0 AND a_id=" . $tpl->P['id'];
    $row = $db->getRow($sql);
    if (!$row) {
        showMsg("获取数据失败,请勿非法传递参数", "../");
    }
    $tpl->T = $MAC_CACHE['arttype'][$row['a_type']];
    $tpl->D = $row;
    unset($row);
    $tpl->loadart();
    $tpl->replaceArt();
} else {
    showErr('System', '未找到指定系统模块');
}
Example #15
0
function reduction()
{
    global $db;
    $fname = be("get", "file");
    $handle = opendir('bak');
    while ($file = readdir($handle)) {
        if (strpos("," . $file, $fname) > 0) {
            $fpath = "bak/" . $file;
            $sqls = file($fpath);
            foreach ($sqls as $sql) {
                $sql = str_replace("\r", "", $sql);
                $sql = str_replace("\n", "", $sql);
                $sql = str_replace(chr(13), "", $sql);
                if (!isN($sql)) {
                    //echo ",".$sql.",";exit;
                    $db->query(trim($sql));
                }
            }
            unset($sqls);
        }
    }
    closedir($handle);
    unset($handle);
    showMsg("成功还原数据库", getReferer());
}
Example #16
0
    $query = mysql_query($sql);
    //$user = mysql_fetch_assoc($query);
    //$_SESSION['username'] = $user['username'];
    if (mysql_num_rows($query)) {
        exit('用户名' . $username . '已经被注册');
    } else {
        $sql = " INSERT INTO  `php_msg`.`pre_member` (";
        $sql .= " `username` ,";
        $sql .= " `password` ";
        $sql .= " ) VALUE (";
        $sql .= "'{$username}',";
        $sql .= "'{$password}'";
        $sql .= " )";
        $query = mysql_query($sql);
    }
    showMsg("注册成功", url('index'));
} else {
    head();
    ?>
    <form class="form-horizontal" method="post">

        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-3">
                <input name="username"  id="username" type="text" class="form-control" id="inputEmail3">
            </div>
            <div class="col-sm-3" id="usernameCheckResult">

            </div>
        </div>
Example #17
0
File: db.php Project: klarclm/sgv
            $rscount = count($rsdata);
            $intable = 'INSERT INTO ' . $table . ' VALUES(';
            for ($j = 0; $j < $rscount; $j++) {
                $line = $intable;
                for ($k = 0; $k <= $fsd; $k++) {
                    if ($k < $fsd) {
                        $line .= "'" . mysql_escape_string($rsdata[$j][$fs[$k]]) . "',";
                    } else {
                        $line .= "'" . mysql_escape_string($rsdata[$j][$fs[$k]]) . "');\r\n";
                    }
                }
                $sql .= $line;
                if (strlen($sql) >= 1500000) {
                    $fname = $fpath . '-' . $p . '.sql';
                    fwrite(fopen($fname, 'wb'), $sql);
                    $p++;
                    unset($sql);
                }
            }
            unset($rsdata);
        }
        unset($fs);
    }
    unset($tablearr);
    $sql .= make_manager(str_replace('{pre}', $GLOBALS['MAC']['db']['tablepre'], '{pre}manager'));
    $fname = $fpath . '-' . $p . '.sql';
    fwrite(fopen($fname, 'wb'), $sql);
    showMsg('备份成功', '?m=db-list');
} else {
    showErr('System', '未找到指定系统模块');
}
Example #18
0
	if($_REQUEST['arc_name'] && strpos($_REQUEST['arc_name'],'freetrix/') === false)
	{
		$ok = unlink($_SERVER["DOCUMENT_ROOT"]."/".$_REQUEST["arc_name"]) && $ok;
		$i = 0;
		while(file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$_REQUEST['arc_name'].'.'.++$i))
			$ok = unlink($_SERVER['DOCUMENT_ROOT'].'/'.$_REQUEST['arc_name'].'.'.$i) && $ok;
	}

	foreach(array('cache','stack_cache','managed_cache') as $dir)
		@DeleteDirRec($_SERVER['DOCUMENT_ROOT'].'/freetrix/'.$dir);

	if (!$ok)
		showMsg(getMsg("FINISH_ERR_DELL_TITLE", LANG), getMsg("FINISH_ERR_DELL", LANG));
	else
	{
		showMsg(getMsg("FINISH", LANG), getMsg("FINISH_MSG", LANG), '<input type=button onclick="document.location=\'/\'" value="'.getMsg("FINISH_BTN", LANG).'">');
		?><script>window.setTimeout(function(){document.location="/";},5000);</script><?
	}
}

#################### END ############




class CDBRestore
{
	var $type = "";
	var $DBHost ="";
	var $DBName = "";
	var $DBLogin = "";
Example #19
0
#                                                                                                                       #
#   http://creativecommons.org/licenses/by-nc/3.0/legalcode                                                             #
#                                                                                                                       #
#   This work is WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS FOR A PARTICULAR PURPOSE.           #
#                                                                                                                       #
#########################################################################################################################
if ($user->signed) {
    redirect("./?page=account");
}
?>
	
	<h1>Login</h1>
	
	<div class="report">
		<?php 
echo showMsg();
?>
	</div>
	
    <form method="post" action="ps/login.php">
        <label>Username or Email:</label>
        <input name="username" type="text" value="">
        
        
        <label>Password:</label>
        <input name="password" type="password">
        
        
        <label>Remember me?:</label>
        <input name="auto" type="checkbox" style="display: inline-block">
        
function cjtype()
{
    global $action, $rtype, $rpage, $rkey, $rday, $cjurl, $xt, $rid, $cjflag, $backurl;
    $flag = false;
    if (isN($rtype)) {
        showMsg("请先进入分类,否则无法使用采集分类!", $backurl);
        exit;
    }
    if ($xt == "1") {
        $url = $cjurl . "?ac=videolist&rid=" . $rid . "&pg=" . $rpage . "&t=" . $rtype;
    } else {
        if ($xt == "2") {
            $url = $cjurl . "?s=plus-api-xml-cms-ff-action-all-vodids--cid-" . $rtype . "-play--inputer--wd--h-0-p-" . $rpage;
        } else {
            $url = $cjurl . "?action=cjtype&rpage=" . $rpage . "&rtype=" . $rtype;
        }
    }
    insertdata($url, "cjtype");
}
Example #21
0
     } else {
         mysql_query("CREATE DATABASE IF NOT EXISTS `{$db['name']}`", $link);
     }
 }
 $query = mysql_query("SHOW DATABASES LIKE  '{$db['name']}';");
 if (!mysql_fetch_assoc($query)) {
     showMsg("数据库不存在且创建数据库失败!");
 }
 if (mysql_errno()) {
     showMsg(mysql_error());
 }
 if (empty($error)) {
     mysql_select_db($db['name']);
     $query = mysql_query("SHOW TABLES LIKE '{$db['prefix']}%';");
     if (mysql_fetch_assoc($query)) {
         showMsg('您的数据库不为空,请重新建立数据库或是清空该数据库或更改表前缀!');
     }
 }
 $config = (include './Application/Common/Conf/config.php');
 $conf = array('DB_TYPE' => 'mysql', 'DB_HOST' => $db['server'], 'DB_USER' => $db['username'], 'DB_PWD' => $db['password'], 'DB_NAME' => $db['name'], 'DB_PORT' => $db['port'], 'DB_PREFIX' => $db['prefix'], 'DB_CHARSET' => 'utf8');
 $c = array_merge($config, $conf);
 $settingstr = "<?php \n return array(\n";
 foreach ($c as $key => $v) {
     if ($i == count($c) - 1) {
         if (is_array($v)) {
             $settingstr .= "\t'" . $key . "'=>array('" . implode("','", $v) . "')";
         } else {
             $settingstr .= "\t'" . $key . "'=>'" . $v . "'";
         }
     } else {
         if (is_array($v)) {
Example #22
0
 case 'day':
     switch ($xt) {
         case '0':
             $url = "?action=cjday&rday=" . $hour . "&rpage=" . $pg;
             break;
         case '1':
             $url = "?ac=videolist&rid=" . $group . "&h=" . $hour . "&pg=" . $pg;
             break;
         case '2':
             $url = "-action-day-vodids--cid--play--inputer--wd--h-" . $hour . "-p-" . $pg;
             break;
     }
     break;
 case 'type':
     if (empty($type)) {
         showMsg("请先进入分类,否则无法使用采集分类!", $backurl);
         exit;
     }
     switch ($xt) {
         case '0':
             $url = "?action=cjtype&rpage=" . $pg . "&rtype=" . $type;
             break;
         case '1':
             $url = "?ac=videolist&rid=" . $group . "&pg=" . $pg . "&t=" . $type;
             break;
         case '2':
             $url = "-action-all-vodids--cid-" . $type . "-play--inputer--wd--h-0-p-" . $pg;
             break;
     }
     break;
 case 'all':
Example #23
0
File: make.php Project: klarclm/sgv
                ob_flush();
                flush();
            }
            $rc = true;
            $n++;
        }
        unset($rs);
        $pagego = empty($no) ? 3 : 4;
    }
    if (!empty($upids)) {
        $sql = 'update {pre}' . $tab . ' set ' . $pre . '_maketime=' . time() . ' where ' . $pre . '_id in (' . $upids . ')';
        $db->query($sql);
    }
    //echo $pagego;exit;
    if (!empty($vid)) {
        jump(getReferer(), $MAC['app']['maketime']);
    } elseif ($pagego == 1 || $pagego == 2) {
        if ($datacount == 0 && !empty($ac2) && empty($ids)) {
            showMsg('内容页面生成完毕!', '?m=make-option');
        } else {
            jump('?m=make-info-ids-' . $ids . '-num-' . ($num + 1) . '-tab-' . $tab . '-ac2-' . $ac2 . '-no-' . $no . '-pg-0-min-' . $min . '-jump-' . $jump, $MAC['app']['maketime']);
        }
    } elseif ($pagego == 3) {
        jump('?m=make-info-ids-' . $ids . '-num-' . $num . '-tab-' . $tab . '-ac2-' . $ac2 . '-no-' . $no . '-pg-' . ($page + 1) . '-min-' . $min . '-jump-' . $jump, $MAC['app']['maketime']);
    } elseif ($pagego == 4) {
        jump(getReferer());
    }
    echo '' . getRunTime() . '';
} else {
    showErr('System', '未找到指定系统模块');
}
Example #24
0
	$ok = unlink($_SERVER["DOCUMENT_ROOT"]."/restore.php");

	if($_REQUEST['arc_name'])
	{
		$ok = unlink($_SERVER["DOCUMENT_ROOT"]."/".$_REQUEST["arc_name"]) && $ok;
		$i = 0;
		while(file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$_REQUEST['arc_name'].'.'.++$i))
			$ok = unlink($_SERVER['DOCUMENT_ROOT'].'/'.$_REQUEST['arc_name'].'.'.$i) && $ok;
	}


	if (!$ok)
		showMsg(getMsg("FINISH_ERR_DELL_TITLE", LANG), getMsg("FINISH_ERR_DELL", LANG));
	else
	{
		showMsg(getMsg("FINISH", LANG), getMsg("FINISH_MSG", LANG));
		?><script>window.setTimeout(function(){document.location="/";},3000);</script><?
	}
}

#################### END ############




class CDBRestore
{
	var $type = "";
	var $DBHost ="";
	var $DBName = "";
	var $DBLogin = "";
Example #25
0
<div id="iconoipad3"> </div>
<div id="tituloseccion1"><h2>Posteos</h2></div>
<section id="caracteristicas3">
<form action="new_entry.php">
  <input type="submit" name="enviar" value="Nuevo Posteo" class="envio btn" /><br/>
</form>	
<?php 
if (isset($msg)) {
    echo showMsg($msg);
}
?>
<table class="table">
  <tr class="ocultarmob">
    <th>Titulo</th>
    <th class="ocultar">Fecha</th>
    <th class="ocultar">Tags</th>
    <th>Acciones</th>
  </tr>
<?php 
foreach ($entries as $e) {
    ?>
  <tr>
    <td><?php 
    echo $e['title'];
    ?>
</td>
    <td class="ocultar"><?php 
    echo $e['date'];
    ?>
</td>
    <td class="ocultar"><?php 
Example #26
0
    }
    $friendsAllUids = getFriendsIdArr($winduid);
    $pages = numofpage($count, $page, ceil($count / $db_perpage), "{$thisbase}ftid={$ftype}&");
} elseif ($type == 'find') {
    S::gp(array('step', 'according'));
    $db_perpage = 12;
    $according = $according ? $according : 'user';
    ${$according . 'checked'} = 'selected="selected"';
    //所有好友
    $friendsAllUids = getFriendsIdArr($winduid);
    if ($step == 2) {
        S::gp(array('f_keyword', 'decode'));
        !isset($f_keyword) && Showmsg('pse_input_keyword');
        $decode && ($f_keyword = pwConvert($f_keyword, $db_charset, 'utf8'));
        if ($according && !in_array($according, array('user', 'uid', 'email', 'tags'))) {
            showMsg("抱歉,搜索类型不存在");
        }
        $f_keyword = strip_tags($f_keyword);
        $count = 0;
        $members = $myAttentionUids = array();
        $searchURL = "u.php?a=friend&type=find";
        switch ($according) {
            case "user":
                $searcherService = L::loadclass('searcher', 'search');
                /* @var $searcherService PW_searcher */
                $uids = $memberdata = $attentionData = array();
                list($count, $users) = $searcherService->searchUsers($f_keyword, $page, $db_perpage);
                $users = $users ? $users : array();
                foreach ($users as $user) {
                    $uids[] = $user['uid'];
                }
Example #27
0
             }
             $vs = explode(',', $v);
             //HTML文本特殊处理
             if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') {
                 ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]);
             } else {
                 if (!isset(${$vs[0]})) {
                     ${$vs[0]} = '';
                 }
                 ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID);
             }
             $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'";
         }
     }
     if (empty($dede_fieldshash) || $dede_fieldshash != md5($dede_addonfields . $cfg_cookie_encode)) {
         showMsg('数据校验不对,程序返回', '-1');
         exit;
     }
     // 这里对前台提交的附加数据进行一次校验
     $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE);
     if ($fontiterm != $inadd_f) {
         ShowMsg("提交表单同系统配置不相符,请重新提交!", "-1");
         exit;
     }
 }
 //更改主档案表
 $upQuery = "UPDATE `#@__archives` set\r\n             ismake='{$ismake}',\r\n             arcrank='{$arcrank}',\r\n             typeid='{$typeid}',\r\n             title='{$title}',\r\n             litpic='{$litpic}',\r\n             description='{$description}',\r\n             keywords='{$keywords}',            \r\n             flag='{$flag}'\r\n      WHERE id='{$aid}' AND mid='{$mid}'; ";
 if (!$dsql->ExecuteNoneQuery($upQuery)) {
     ShowMsg("更新数据库archives表时出错,请检查!", "-1");
     exit;
 }
Example #28
0
    $valarr = array($readonly, $backurl, $file, $filecontent);
    for ($i = 0; $i < count($colarr); $i++) {
        $n = $colarr[$i];
        $v = $valarr[$i];
        $plt->set_var($n, $v);
    }
} elseif ($method == 'adsdel') {
    $path = '../template/' . $MAC['site']['templatedir'] . '/' . $MAC['site']['adsdir'] . '/';
    $file = str_replace('$$$', '-', $p['file']);
    if ($file != '') {
        if (!file_exists($path . $file)) {
            showErr('System', '缺少文件' . $path . $file);
        } else {
            unlink($path . $file);
        }
    }
    redirect(getReferer());
} elseif ($method == 'adssave') {
    $path = '../template/' . $MAC['site']['templatedir'] . '/' . $MAC['site']['adsdir'] . '/';
    $file = be('post', 'file');
    $filecontent = stripslashes(be('post', 'filecontent'));
    if (!is_dir($path)) {
        mkdir($path);
    }
    fwrite(fopen($path . $file . '.js', 'wb'), $filecontent);
    showMsg('数据已保存', '');
} elseif ($method == 'wizard') {
    $plt->set_file('main', $ac . '_' . $method . '.html');
} else {
    showErr('System', '未找到指定系统模块');
}
Example #29
0
     include_once DEDEINC . '/datalistcp.class.php';
     $query = "SELECT * FROM {$diy->table} ORDER BY id DESC";
     $datalist = new DataListCP();
     $datalist->pageSize = 10;
     $datalist->SetParameter('action', 'list');
     $datalist->SetParameter('diyid', $diyid);
     $datalist->SetTemplate(DEDEADMIN . '/templets/diy_list.htm');
     $datalist->SetSource($query);
     $fieldlist = $diy->getFieldList();
     $datalist->Display();
 } else {
     if ($action == 'edit') {
         if (empty($do)) {
             $id = isset($id) && is_numeric($id) ? $id : 0;
             if (empty($id)) {
                 showMsg('非法操作!未指定id', 'javascript:;');
                 exit;
             }
             $query = "SELECT * FROM {$diy->table} WHERE id={$id}";
             $row = $dsql->GetOne($query);
             if (!is_array($row)) {
                 showmsg("你访问的记录不存在或未经审核", '-1');
                 exit;
             }
             $postform = $diy->getForm('edit', $row, 'admin');
             $fieldlist = $diy->getFieldList();
             $c1 = $row['ifcheck'] == 1 ? 'checked' : '';
             $c2 = $row['ifcheck'] == 0 ? 'checked' : '';
             include DEDEADMIN . '/templets/diy_edit_content.htm';
         } else {
             if ($do == 2) {
Example #30
0
 $_SESSION['total_value'] = '';
 $needjifen = $usejifen ? Helper_Archive::getNeedJifen($jifentprice) : 0;
 $userinfo = $User->getInfoByMid($User->uid);
 //获取用户信息
 //这里再次判断用户积分是否满足条件.
 if ($userinfo['jifen'] < $needjifen) {
     $usejifen = 0;
     $needjifen = 0;
 }
 if (empty($suitid)) {
     showMsg("请选择套餐", -1, 3);
     exit;
 }
 $row = $dsql->getOne("select a.*,b.aid,b.title from #@__car_suit a inner join #@__car b on a.carid=b.id  where a.id={$suitid}");
 if (empty($row)) {
     showMsg("定购错误,请重试", -1, 3);
     exit;
 }
 $ordersn = get_order_sn('03');
 //订单号
 $memberid = $User->uid ? $User->uid : 0;
 $status = $paytype == 1 ? 1 : 0;
 $price = getSuitPriceByDay($suitid, $usedate);
 $total_store = getSuitNumberByDay($suitid, $usedate);
 $total_dingnum = intval(Helper_Archive::pregReplace($dingnum, 2));
 if ($total_store != -1 && $total_store < $total_dingnum) {
     echo 'nonumber';
     exit;
 }
 $linktel = Helper_Archive::pregReplace($linktel, 2);
 $arr = array('ordersn' => $ordersn, 'webid' => 0, 'typeid' => 3, 'productautoid' => $row['carid'], 'productaid' => $row['aid'], 'productname' => $row['title'] . '(' . $row['suitname'] . ')', 'price' => $price, 'usedate' => $usedate, 'dingnum' => Helper_Archive::pregReplace($dingnum, 2), 'linkman' => Helper_Archive::pregReplace($linkman, 5), 'linktel' => Helper_Archive::pregReplace($linktel, 2), 'linkemail' => Helper_Archive::pregReplace($linkemail, 5), 'linkqq' => '', 'jifentprice' => $row['jifentprice'], 'jifenbook' => $row['jifenbook'], 'jifencomment' => $row['jifencomment'], 'addtime' => time(), 'memberid' => $memberid, 'dingjin' => $row['dingjin'], 'paytype' => $paytype, 'usejifen' => $usejifen, 'needjifen' => $needjifen, 'status' => $status, 'haschild' => 0, 'pid' => 0, 'remark' => Helper_Archive::pregReplace($remarkinfo, 5));