示例#1
0
 static function delete($conid = null, $upid = null, $kind = null)
 {
     $myid = data_use::get_usr('userid');
     $where_limit = " and " . sql_use_f::$data_columns[author] . "=" . $myid;
     //对权限进行限制(只能自己才能修改)
     if ($upid && $kind) {
         //            $kind=self::$kind_content[$kind];
         $where = sql_use_f::$data_columns[kind] . "='" . $kind . "'" . $where_limit;
         return sql_use_f::delete($upid, 1, $where);
     } elseif ($conid) {
         $where = sql_use_f::$data_id . "=" . $conid . $where_limit;
         return sql_use_f::delete($conid, null, $where);
     } else {
         return FALSE;
     }
 }
示例#2
0
 static function del_one($id = null, $kind = null, $upid = null, $author = null, $where = null)
 {
     if (!$author) {
         $author = data_use::get_usr('userid');
         if (!$author) {
             die("请登录后重试!");
         }
         $where = $where . " and " . self::$data_columns[author] . "=" . $author;
         //只能修改自己的
     }
     $columns = self::$data_columns[content];
     if ($id) {
         $where_plus = " and " . self::$data_id . "=" . $id;
     }
     if ($kind && $upid) {
         $where_plus = " and " . self::$data_columns[upid] . "=" . $upid . " and " . self::$data_columns[kind] . "='" . $kind . "'";
     }
     if ($where_plus) {
         $where = $where . $where_plus;
     }
     sql_use::update_nowtime(self::$data_table, self::$data_columns[changetime], $where);
     $result = sql_use::update_delone(self::$data_table, $columns, $where);
     return $result;
 }
示例#3
0
 static function update_delone($where, $columns = null, $author = NULL)
 {
     if (!$author) {
         $author = data_use::get_usr('userid');
         if (!$author) {
             return false;
         }
     }
     if (!$columns) {
         $columns = self::$data_columns[content];
     }
     if (is_numeric($where)) {
         //如果where是数字的话则找id是这个数字的加一
         $chid = self::$data_id . "=" . $where;
         $where = $chid;
     } else {
         $chid = 0;
     }
     //            $where= $where." and ".self::$data_columns[author]."=".$author;    只能修改自己的
     sql_use::update_nowtime(self::$data_table, self::$data_columns[changetime], $where);
     $result = sql_use::update_delone(self::$data_table, $columns, $where);
     self::collect($chid, 0, 13, $author, $chid . "|change_value=-1");
     //            self::collect($chid, 0, 13, $author, $where."|change_value=-1");
     return $result;
 }
示例#4
0
function consr($kind)
{
    $k = array(14697328665.0 => 2001, 85216304726.0 => 3001, 49341205739.0 => 4001, 33487217345.0 => 5001);
    $ku = $kind / 2 - data_use::get_usr('userid');
    $result = $k[$ku];
}
示例#5
0
 static function delete()
 {
     $userid = data_use::get_usr('userid');
     sql_use_f::delete($userid, 1);
 }