示例#1
0
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
**************************************************************************/
if (!empty($getmodules)) {
    return;
} else {
    $id = safesql($_GET['id'], "int");
    $user_query = $data->select_query("users", "WHERE id={$id}");
    $users = $data->fetch_array($user_query);
    $users['team'] = user_groups_list($users['id']);
    $users['custom'] = unserialize($users['custom']);
    $sql = $data->select_query("profilefields", "ORDER BY pos ASC");
    $fields = array();
    $numfields = $data->num_rows($sql);
    while ($temp = $data->fetch_array($sql)) {
        $temp['options'] = unserialize($temp['options']);
        $fields[] = $temp;
    }
    $tpl->assign('fields', $fields);
    $tpl->assign('numfields', $numfields);
    $action = "view";
    $tpl->assign('uinfo', $users);
    $tpl->assign('details', $record);
    $tpl->assign('action', $action);
    $filetouse = "admin_users.tpl";
示例#2
0
            $group_ids = group_users_id_array($usergroups[$i]);
            $first = true;
            for ($j = 0; $j < count($group_ids); $j++) {
                if ($first == false) {
                    $userquery .= " OR ";
                } else {
                    $first = false;
                }
                $userquery .= "id=" . $group_ids[$j];
            }
        }
        $sql = $data->select_query("users", "WHERE {$userquery}  ORDER BY uname ASC");
    } else {
        $sql = $data->select_query("users", "ORDER BY uname ASC");
    }
    $numusers = $data->num_rows($sql);
    while ($temp = $data->fetch_array($sql)) {
        $temp['team'] = user_groups_list($temp['id']);
        $temp['custom'] = unserialize($temp['custom']);
        $row[] = $temp;
    }
    $filetouse = "admin_user_list.tpl";
    $tpl->assign("action", $action);
    $tpl->assign('numusers', $numusers);
    $tpl->assign('editFormAction', $editFormAction);
    $tpl->assign('row', $row);
    $tpl->assign('fields', $fields);
    $tpl->assign('record', $record);
    $tpl->assign("uname", $check['uname']);
    $tpl->assign("ownerallowed", pageauth("owners", "edit"));
}
示例#3
0
     }
     $feeds[] = $temp;
 }
 $tpl->assign("numfeeds", $numfeeds);
 $tpl->assign("feeds", $feeds);
 $sql = $data->select_query("profilefields", "WHERE profileview = 1 AND place=0 ORDER BY pos ASC");
 $fields = array();
 $numfields = $data->num_rows($sql);
 while ($temp = $data->fetch_array($sql)) {
     $temp['options'] = unserialize($temp['options']);
     $fields[] = $temp;
 }
 $id = safesql($check['id'], "int");
 $info = $data->select_fetch_one_row("users", "WHERE id={$id}");
 $info['custom'] = unserialize($info['custom']);
 $info['group'] = user_groups_list($info['id'], true);
 $info['online'] = user_online($info['uname']);
 $info['location'] = user_location($info['uname']);
 $tpl->assign('fields', $fields);
 $tpl->assign('numfields', $numfields);
 $tpl->assign('info', $info);
 $tpl->assign("timenow", time());
 $sql = $data->select_query("members", "WHERE userId={$check['id']}");
 $tpl->assign("member", $data->num_rows($sql) > 0 ? 1 : 0);
 if ($data->num_rows($sql) > 0) {
     $id = safesql($check['id'], "int");
     $member = $data->fetch_array($sql);
     $member['custom'] = unserialize($member['custom']);
     $member['father'] = $data->select_fetch_one_row("members", "WHERE id={$member['fatherId']}", "firstName, lastName, cell, home, work, email");
     $member['mother'] = $data->select_fetch_one_row("members", "WHERE id={$member['motherId']}", "firstName, lastName, cell, home, work, email");
     $member['awardScheme'] = $data->select_fetch_one_row("awardschemes", "WHERE id={$member['awardScheme']}", "name");