示例#1
0
     !$id && alert("请选择要删除的文章");
     delArticle($id, $member->uId, 0) && alert('成功删除!', "url:1");
     break;
 case 'manage':
     $catalog = new catalog();
     $cid = (int) $_GET['cid'];
     $sql = " where 1=1";
     $cid && ($sql .= " AND `cid` ='{$cid}'");
     //	$sql.=$_GET['type']=='draft'?"`visible` ='0'":"`visible` ='1'";
     $orderby = $_GET['orderby'] ? $_GET['orderby'] : "id DESC";
     $maxperpage = (int) $_GET['perpage'] > 0 ? $_GET['perpage'] : 10;
     $total = $iCMS->db->getValue("SELECT count(*) FROM `#iCMS@__article` {$sql} AND `postype`='0' AND `userid`='{$member->uId}' order by {$orderby}");
     page($total, $maxperpage, "篇文章");
     $rs = $iCMS->db->getArray("SELECT * FROM `#iCMS@__article` {$sql} AND `postype`='0' AND `userid`='{$member->uId}' order by {$orderby} LIMIT {$firstcount} , {$maxperpage}");
     $_count = count($rs);
     include iCMS_usercp_tpl("home");
     break;
 case 'post':
     switch ($action) {
         case 'save':
             set_time_limit(0);
             $aid = intval($_POST['aid']);
             $cid = intval($_POST['catalog']);
             $title = dhtmlspecialchars($_POST['title']);
             $pic = dhtmlspecialchars($_POST['pic']);
             $source = dhtmlspecialchars($_POST['source']);
             $author = dhtmlspecialchars($_POST['author']);
             $editor = dhtmlspecialchars($_POST['editor']);
             $description = dhtmlspecialchars($_POST['description']);
             $keywords = dhtmlspecialchars($_POST['keywords']);
             $pubdate = _strtotime($_POST['pubdate']);
示例#2
0
 function LoginPage()
 {
     include iCMS_usercp_tpl('login');
 }
示例#3
0
function iCMS_user_login()
{
    include iCMS_usercp_tpl('login');
}
示例#4
0
<?php

/**
 * @package iCMS V3.1
 * @copyright 2007-2009, iDreamSoft
 * @license http://www.idreamsoft.cn iDreamSoft
 * @author coolmoo <*****@*****.**>
 */
!defined('iPATH') && exit('What are you doing?');
switch ($operation) {
    case 'profile':
        $rs = $iCMS->db->getRow("SELECT * FROM `#iCMS@__members` WHERE `uid`='" . $member->uId . "'");
        $rs->info = unserialize($rs->info);
        include iCMS_usercp_tpl("profile");
        break;
    case 'post':
        if ($action == 'edit') {
            $uid = $member->uId;
            $info = array();
            if ($_POST['pwd'] || $_POST['pwd1'] || $_POST['pwd2']) {
                $pwd = md5(trim($_POST['pwd']));
                $pwd1 = md5(trim($_POST['pwd1']));
                $pwd2 = md5(trim($_POST['pwd2']));
                if (!$_POST['pwd'] || !$_POST['pwd1'] || !$_POST['pwd2']) {
                    alert("修改密码.原密码,新密码,确认密码不能为空");
                }
                $pwd != $user['password'] && alert("原密码错误!");
                $pwd1 != $pwd2 && alert("新密码与确认密码不一致!");
                $iCMS->db->query("UPDATE `#iCMS@__members` SET `password` = '{$pwd2}' WHERE `uid` ='{$uid}' LIMIT 1");
            }
            //	    $username=dhtmlspecialchars($_POST['name']);