function blog_read_base($fields = "*", $condition = "", $get_type = "", $num = "", $by_col = "log_id", $order = "desc", $cache = "", $cache_key = "") { global $tablePreStr; global $page_num; global $page_total; global $is_self; $is_pass = '******'; $is_admin = get_sess_admin(); $t_blog = $tablePreStr . "blog"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $limit = $num ? " limit {$num} " : ""; $by_col = $by_col ? " {$by_col} " : " log_id "; $order = $order ? $order : "desc"; $get_type = $get_type == 'getRow' ? "getRow" : "getRs"; $is_pass = $is_self == 'Y' || $is_admin ? '1' : $is_pass; $sql = " select {$fields} from {$t_blog} where {$is_pass} {$condition} order by {$by_col} {$order} {$limit} "; if (empty($result_rs)) { if ($limit == '') { $dbo->setPages(20, $page_num); } $result_rs = $dbo->{$get_type}($sql); $page_total = $dbo->totalPage; } return $result_rs; }
function filt_word($Content) { global $wordFilt; $is_admin = get_sess_admin(); if ($wordFilt == 1 && $is_admin == '') { global $filtrateStr; $f_array = explode(",", $filtrateStr); $repl = "*"; foreach ($f_array as $v) { $Content = str_replace($v, $repl, $Content); } } return get_face($Content); }
function check_pri($holder, $exp = '') { $sess_uid = get_sess_userid(); $is_admin = get_sess_admin(); if ($sess_uid != $holder && !$is_admin) { if ($exp) { if (!$sess_uid) { return false; } if ($exp == '!all') { //全否定 return false; } if (strpos(",{$exp}", "{")) { //限定人 $per_str = preg_replace("/{([,\\d]+)}/", "\$1", $exp); if (strpos(",{$per_str}", ",{$sess_uid},")) { return true; } } if (strpos(",{$exp}", "[")) { //限定组 $sort_str = preg_replace("/\\[([,\\d]+)\\]/", "\$1", $exp); global $dbo; global $tablePreStr; global $dbServs; if (!$dbo) { $dbo = new dbex(); dbplugin('r'); } $table = $tablePreStr . "pals_mine"; $sql = "select pals_sort_id from {$table} where pals_id={$sess_uid} and user_id={$holder}"; $sort_id = $dbo->getRow($sql); $sess_sort_id = $sort_id['pals_sort_id']; if (strpos(",{$sort_str}", ",{$sess_sort_id},")) { return true; } } } else { return true; } } else { return true; } }
//引入公共函数 require "foundation/module_group.php"; require "foundation/fpages_bar.php"; require "api/base_support.php"; //引入语言包 $g_langpackage = new grouplp(); //变量区 $role = ''; $user_id = get_sess_userid(); $group_id = intval(get_argg('group_id')); $url_uid = intval(get_argg('user_id')); //链接地址变更 $main_URL = "content_none"; $home_URL = ""; $is_admin = get_sess_admin(); if ($is_admin == '') { $main_URL = ""; $home_URL = "content_none"; } $page_num = trim(get_argg('page')); $key_word = short_check(get_argp('key_word')); //数据表定义 $t_users = $tablePreStr . "users"; $t_groups = $tablePreStr . "groups"; $t_group_members = $tablePreStr . "group_members"; $t_group_subject = $tablePreStr . "group_subject"; $t_group_subject_comment = $tablePreStr . "group_subject_comment"; //定义读操作 dbtarget('r', $dbServs); $dbo = new dbex();
<h3><?php echo $p_langpackage->p_amend_pw; ?> </h3> <div class="content"> <form id="form1" name="form1" method="post" action="" onsubmit="return check_form();"> <table class='form-table'> <tr> <td><div align="right"><?php echo $p_langpackage->p_name; ?> :</div></td> <td> <label> <input type="text" name="name" id="name" class="regular-text" value="<?php echo get_sess_admin(); ?> " /> </label></td> </tr> <tr> <td><div align="right"><?php echo $p_langpackage->p_formerly_pw; ?> :</div></td> <td> <label> <input type="password" name="formerly_pw" value="" class="regular-text" /> </label></td> </tr> <tr>