本文整理汇总了PHP中uq函数的典型用法代码示例。如果您正苦于以下问题:PHP uq函数的具体用法?PHP uq怎么用?PHP uq使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uq函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: send_pmsg
function send_pmsg()
{
$this->pmsg_opt |= 16 | 32;
$this->pmsg_opt &= 16 | 32 | 1 | 2 | 4;
foreach ($GLOBALS['recv_user_id'] as $v) {
$id = db_qid("INSERT INTO phpgw_fud_pmsg (\n\t\t\t\tto_list,\n\t\t\t\touser_id,\n\t\t\t\tip_addr,\n\t\t\t\thost_name,\n\t\t\t\tpost_stamp,\n\t\t\t\ticon,\n\t\t\t\tfldr,\n\t\t\t\tsubject,\n\t\t\t\tattach_cnt,\n\t\t\t\tfoff,\n\t\t\t\tlength,\n\t\t\t\tduser_id,\n\t\t\t\tref_msg_id,\n\t\t\t\tpmsg_opt\n\t\t\t) VALUES (\n\t\t\t\t" . strnull(addslashes($this->to_list)) . ",\n\t\t\t\t" . $this->ouser_id . ",\n\t\t\t\t'" . $this->ip_addr . "',\n\t\t\t\t" . $this->host_name . ",\n\t\t\t\t" . $this->post_stamp . ",\n\t\t\t\t" . strnull($this->icon) . ",\n\t\t\t\t1,\n\t\t\t\t'" . addslashes($this->subject) . "',\n\t\t\t\t" . intzero($this->attach_cnt) . ",\n\t\t\t\t" . $this->foff . ",\n\t\t\t\t" . $this->length . ",\n\t\t\t\t" . $v . ",\n\t\t\t\t" . strnull($this->ref_msg_id) . ",\n\t\t\t\t" . $this->pmsg_opt . ")");
$GLOBALS['send_to_array'][] = array($v, $id);
$um[$v] = $id;
}
$c = uq('SELECT id, email, users_opt, icq FROM phpgw_fud_users WHERE id IN(' . implode(',', $GLOBALS['recv_user_id']) . ') AND users_opt>=64 AND (users_opt & 64) > 0');
$from = $GLOBALS['usr']->alias;
reverse_fmt($from);
$subject = $this->subject;
reverse_fmt($subject);
while ($r = db_rowarr($c)) {
/* do not send notifications about messages sent to self */
if ($r[0] == $this->ouser_id) {
continue;
}
if (!($r[2] & 4)) {
$r[1] = $r[3] . '@pager.icq.com';
}
send_pm_notification($r[1], $um[$r[0]], $subject, $from, $r[2]);
}
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:25,代码来源:pmsg.php
示例2: attach_rebuild_cache
function attach_rebuild_cache($id)
{
$c = uq('SELECT a.id, a.original_name, a.fsize, a.dlcount, CASE WHEN m.icon IS NULL THEN \'unknown.gif\' ELSE m.icon END FROM phpgw_fud_attach a LEFT JOIN phpgw_fud_mime m ON a.mime_type=m.id WHERE message_id=' . $id . ' AND attach_opt=0');
while ($r = db_rowarr($c)) {
$ret[] = $r;
}
return isset($ret) ? $ret : null;
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:8,代码来源:getfile.php
示例3: get_sql_disk_usage
function get_sql_disk_usage()
{
$ver = q_singleval('SELECT VERSION()');
if ($ver[0] != 4 && strncmp($ver, '3.23', 4)) {
return;
}
$sql_size = 0;
$c = uq('SHOW TABLE STATUS FROM ' . $GLOBALS['phpgw_info']['server']['db_name'] . ' LIKE \'' . $GLOBALS['DBHOST_TBL_PREFIX'] . '%\'');
while ($r = db_rowobj($c)) {
$sql_size += $r->Data_length + $r->Index_length;
}
return $sql_size;
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:13,代码来源:admstats.php
示例4: grp_rebuild_cache
function grp_rebuild_cache($user_id = null)
{
$list = array();
if ($user_id !== null) {
$lmt = ' user_id IN(' . implode(',', $user_id) . ') ';
} else {
$lmt = '';
}
/* generate an array of permissions, in the end we end up with 1ist of permissions */
$r = uq("SELECT gm.user_id AS uid, gm.group_members_opt AS gco, gr.resource_id AS rid FROM phpgw_fud_group_members gm INNER JOIN phpgw_fud_group_resources gr ON gr.group_id=gm.group_id WHERE gm.group_members_opt>=65536 AND (gm.group_members_opt & 65536) > 0" . ($lmt ? ' AND ' . $lmt : ''));
while ($o = db_rowobj($r)) {
foreach ($o as $k => $v) {
$o->{$k} = (int) $v;
}
if (isset($list[$o->rid][$o->uid])) {
if ($o->gco & 131072) {
$list[$o->rid][$o->uid] |= $o->gco;
} else {
$list[$o->rid][$o->uid] &= $o->gco;
}
} else {
$list[$o->rid][$o->uid] = $o->gco;
}
}
$tmp_t = "phpgw_fud_gc_" . __request_timestamp__;
q("CREATE TEMPORARY TABLE " . $tmp_t . " (a INT, b INT, c INT)");
$tmp = array();
foreach ($list as $k => $v) {
foreach ($v as $u => $p) {
$tmp[] = $k . ", " . $p . ", " . $u;
}
}
if ($tmp) {
if (__dbtype__ == 'mysql') {
ins_m($tmp_t, "a,b,c", $tmp, 1);
} else {
ins_m($tmp_t, "a,b,c", $tmp, "integer, integer, integer");
}
}
if (!db_locked()) {
$ll = 1;
db_lock("phpgw_fud_group_cache WRITE");
}
q("DELETE FROM phpgw_fud_group_cache" . ($lmt ? ' WHERE ' . $lmt : ''));
q("INSERT INTO phpgw_fud_group_cache (resource_id, group_cache_opt, user_id) SELECT a,b,c FROM " . $tmp_t);
if (isset($ll)) {
db_unlock();
}
q("DROP TABLE " . $tmp_t);
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:50,代码来源:groupmgr.php
示例5: ignore_rebuild_cache
function ignore_rebuild_cache($uid)
{
$q = uq('SELECT ignore_id FROM phpgw_fud_user_ignore WHERE user_id=' . $uid);
while ($ent = db_rowarr($q)) {
$arr[$ent[0]] = 1;
}
if (isset($arr)) {
q('UPDATE phpgw_fud_users SET ignore_list=\'' . addslashes(serialize($arr)) . '\' WHERE id=' . $uid);
return $arr;
} else {
q('UPDATE phpgw_fud_users SET ignore_list=NULL WHERE id=' . $uid);
return;
}
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:14,代码来源:ignore_list.php
示例6: array
function &get_all_read_perms($uid, $mod)
{
$limit = array(0);
$r = uq('SELECT resource_id, group_cache_opt FROM phpgw_fud_group_cache WHERE user_id=' . _uid);
while ($ent = db_rowarr($r)) {
$limit[$ent[0]] = $ent[1] & 2;
}
if (_uid) {
$r = uq("SELECT resource_id FROM phpgw_fud_group_cache WHERE resource_id NOT IN (" . implode(',', array_keys($limit)) . ") AND user_id=2147483647 AND (group_cache_opt & 2) > 0");
while ($ent = db_rowarr($r)) {
if (!isset($limit[$ent[0]])) {
$limit[$ent[0]] = 1;
}
}
if ($mod) {
$r = uq('SELECT forum_id FROM phpgw_fud_mod WHERE user_id=' . _uid);
while ($ent = db_rowarr($r)) {
$limit[$ent[0]] = 1;
}
}
}
return $limit;
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:23,代码来源:usrinfo.php
示例7: uq
}
$c = uq('SELECT f.id, f.name FROM phpgw_fud_forum_notify fn LEFT JOIN phpgw_fud_forum f ON fn.forum_id=f.id WHERE fn.user_id=' . _uid . ' ' . $lmt . ' ORDER BY f.last_post_id DESC');
$subscribed_forum_data = '';
while ($r = db_rowarr($c)) {
$subscribed_forum_data .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td width="100%"><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . t_thread_view . '&frm_id=' . $r[0] . '&' . _rsid . '">' . htmlspecialchars($r[1]) . '</a></td><td nowrap><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=subscribed&frm_id=' . $r[0] . '&' . _rsid . '">Unsubscribe</a> | <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . t_thread_view . '&frm_id=' . $r[0] . '&' . _rsid . '" target="_blank">View Forum</a></td></tr>';
}
if (!$subscribed_forum_data) {
$subscribed_forum_data = '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td colspan=2>No subscribed forums</td></tr>';
}
/* Since a person can have MANY subscribed threads, we need a pager & for the pager we need a entry count */
$total = q_singleval('SELECT count(*) FROM phpgw_fud_thread_notify tn LEFT JOIN phpgw_fud_thread t ON tn.thread_id=t.id INNER JOIN phpgw_fud_msg m ON t.root_msg_id=m.id WHERE tn.user_id=' . _uid . ' ' . $lmt);
if (!isset($_GET['start']) || !($start = (int) $_GET['start'])) {
$start = 0;
}
$subscribed_thread_data = '';
$c = uq('SELECT t.id, m.subject FROM phpgw_fud_thread_notify tn INNER JOIN phpgw_fud_thread t ON tn.thread_id=t.id INNER JOIN phpgw_fud_msg m ON t.root_msg_id=m.id WHERE tn.user_id=' . _uid . ' ' . $lmt . ' ORDER BY t.last_post_id DESC LIMIT ' . qry_limit($THREADS_PER_PAGE, $start));
while ($r = db_rowarr($c)) {
$subscribed_thread_data .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td width="100%"><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . d_thread_view . '&th=' . $r[0] . '&' . _rsid . '">' . $r[1] . '</a></td><td nowrap><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=subscribed&th=' . $r[0] . '&' . _rsid . '">Unsubscribe</a> | <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . d_thread_view . '&th=' . $r[0] . '&' . _rsid . '" target="_blank">View Topic</a></td></tr>';
}
if (!$subscribed_thread_data) {
$subscribed_thread_data = '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td colspan=2>No subscribed topics</td></tr>';
}
$pager = tmpl_create_pager($start, $THREADS_PER_PAGE, $total, '/egroupware/fudforum/3814588639/index.php?t=subscribed&a=1&' . _rsid, '#fff');
if ($FUD_OPT_2 & 2) {
$page_gen_end = gettimeofday();
$page_gen_time = sprintf('%.5f', $page_gen_end['sec'] - $PAGE_TIME['sec'] + ($page_gen_end['usec'] - $PAGE_TIME['usec']) / 1000000);
$page_stats = '<br /><div align="left" class="SmallText">Total time taken to generate the page: ' . $page_gen_time . ' seconds</div>';
} else {
$page_stats = '';
}
echo $GLOBALS['fud_egw_hdr'];
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:subscribed.php
示例8: make_reverse_replace_array
function make_reverse_replace_array()
{
$c = uq('SELECT replace_opt, with_str, replace_str, from_post, to_msg FROM phpgw_fud_replace');
while ($r = db_rowarr($c)) {
if (!$r[0]) {
$GLOBALS['__FUD_REPLR__']['pattern'][] = $r[3];
$GLOBALS['__FUD_REPLR__']['replace'][] = $r[4];
} else {
if ($r[0] && strlen($r[1]) && strlen($r[2])) {
$GLOBALS['__FUD_REPLR__']['pattern'][] = '/' . str_replace('/', '\\/', preg_quote(stripslashes($r[1]))) . '/';
preg_match('/\\/(.+)\\/(.*)/', $r[2], $regs);
$GLOBALS['__FUD_REPLR__']['replace'][] = str_replace('\\/', '/', $regs[1]);
}
}
}
define('__fud_replacer_init', 1);
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:17,代码来源:merge_th.php
示例9: exit
* copyright : (C) 2001-2003 Advanced Internet Designs Inc.
* email : [email protected]
* $Id: smladd.php.t,v 1.2 2003/12/18 18:20:49 iliaa Exp $
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
***************************************************************************/
if (_uid === '_uid') {
exit('sorry, you can not access this page');
}
$col_count = '7' - 2;
$col_pos = -1;
$sml_smiley_entry = $sml_smiley_row = '';
$c = uq('SELECT code,img,descr FROM phpgw_fud_smiley ORDER BY vieworder');
while ($r = db_rowarr($c)) {
if ($col_pos++ > $col_count) {
$sml_smiley_row .= '<tr valign="bottom"><td>' . $sml_smiley_entry . '</td></tr>';
$sml_smiley_entry = '';
$col_pos = 0;
}
$r[0] = ($a = strpos($r[0], '~')) ? substr($r[0], 0, $a) : $r[0];
$sml_smiley_entry .= '<a href="javascript: insertParentTag(\' ' . $r[0] . ' \',\'\');"><img src="images/smiley_icons/' . $r[1] . '" title="' . $r[2] . '" alt="' . $r[2] . '" /></a> ';
}
if ($col_pos > -1) {
$sml_smiley_row .= '<tr valign="bottom"><td>' . $sml_smiley_entry . '</td></tr>';
} else {
if ($col_pos == -1) {
$sml_smiley_row = 'No emoticons available.';
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:smladd.php
示例10: std_error
}
if (!($FUD_OPT_1 & (8388608 | 4194304)) || !_uid) {
std_error('disabled');
}
$usr_login = isset($_GET['usr_login']) ? trim($_GET['usr_login']) : '';
$usr_email = isset($_GET['usr_email']) ? trim($_GET['usr_email']) : '';
$overwrite = isset($_GET['overwrite']) ? (int) $_GET['overwrite'] : 0;
$js_redr = $_GET['js_redr'];
if ($usr_login || $usr_email) {
if ($usr_login) {
$qry = "WHERE alias LIKE '" . addslashes(str_replace('\\', '\\\\', $usr_login)) . "%'";
} else {
$qry = "WHERE email LIKE '" . addslashes(str_replace('\\', '\\\\', $usr_email)) . "%'";
}
$find_user_data = '';
$c = uq('SELECT alias FROM phpgw_fud_users ' . $qry . ' AND id>1');
$i = 0;
while ($r = db_rowarr($c)) {
if ($overwrite) {
$retlink = 'javascript: window.opener.document.' . $js_redr . '.value=\'' . addcslashes($r[0], "'\\") . '\'; window.close();';
} else {
$retlink = 'javascript:
if (!window.opener.document.' . $js_redr . '.value) {
window.opener.document.' . $js_redr . '.value = \'' . addcslashes($r[0], "'\\") . '\';
} else {
window.opener.document.' . $js_redr . '.value = window.opener.document.' . $js_redr . '.value + \'; \' + \'' . addcslashes($r[0], "'\\") . '; \';
}
window.close();';
}
$find_user_data .= '<tr class="' . alt_var('pmuserloc_alt', 'RowStyleA', 'RowStyleB') . '"><td><a href="' . $retlink . '">' . $r[0] . '</a></td></tr>';
$i++;
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:pmuserloc.php
示例11: uq
?>
</td>
</tr>
</table>
<input type="hidden" name="edit" value="<?php
echo $edit;
?>
">
</form>
<table class="resulttable fulltable">
<tr bgcolor="#e5ffe7">
<td>Address/Regex</td>
<td>Type</td>
<td>Action</td>
</tr>
<?php
$c = uq('SELECT id, email_block_opt, string FROM ' . $DBHOST_TBL_PREFIX . 'email_block');
$i = 1;
while ($r = db_rowarr($c)) {
if ($edit == $r[0]) {
$bgcolor = ' class="resultrow1"';
} else {
$bgcolor = $i++ % 2 ? ' class="resultrow2"' : ' class="resultrow1"';
}
echo '<tr ' . $bgcolor . '><td>' . htmlspecialchars($r[2]) . '</td><td>' . ($r[1] ? 'Simple' : 'Regex') . '</td><td>[<a href="admemail.php?edit=' . $r[0] . '&' . _rsid . '">Edit</a>] [<a href="admemail.php?del=' . $r[0] . '&' . _rsid . '">Delete</a>]</td></tr>';
}
?>
</table>
<?php
require $WWW_ROOT_DISK . 'adm/admclose.php';
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admemail.php
示例12: unset
echo '<tr><td>' . $r[0] . '</td></tr>';
}
echo '</table>';
} else {
echo 'None<br>';
}
unset($c);
?>
<a name="mod_here"> </a>
<a href="#mod_here" onClick="javascript: window.open('admmodfrm.php?usr_id=<?php
echo $usr_id . '&' . _rsidl;
?>
', 'frm_mod', 'menubar=false,width=200,height=400,screenX=100,screenY=100,scrollbars=yes');">Modify Moderation Permissions</a>
<tr class="field"><td valign=top>Custom Tags:</td><td valign="top">
<?php
$c = uq('SELECT name, id FROM ' . $DBHOST_TBL_PREFIX . 'custom_tags WHERE user_id=' . $usr_id);
while ($r = db_rowarr($c)) {
echo $r[0] . ' [<a href="admuser.php?act=nada&usr_id=' . $usr_id . '&deltag=' . $r[1] . '&' . _rsidl . '">Delete</a>]<br>';
}
?>
<form name="extra_tags" action="admuser.php" method="post">
<?php
echo _hs;
?>
<input type="text" name="c_tag">
<input type="submit" value="Add">
<input type="hidden" name="usr_id" value="<?php
echo $usr_id;
?>
">
<input type="hidden" name="act" value="nada">
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admuser.php
示例13: uq
?>
<html>
<head>
<link rel="StyleSheet" href="adm.css" type="text/css">
<body class="popup">
<h3>Allowing <?php
echo $login;
?>
to moderate:</h3>
<form name="frm_mod" action="admmodfrm.php" method="post">
<?php
echo _hs;
?>
<table class="datatable fulltable">
<?php
$c = uq('SELECT CASE WHEN c.name IS NULL THEN \'DELETED FORUMS\' ELSE c.name END, f.name, f.id, mm.id FROM ' . $tbl . 'forum f LEFT JOIN ' . $tbl . 'cat c ON c.id=f.cat_id LEFT JOIN ' . $tbl . 'mod mm ON mm.forum_id=f.id AND mm.user_id=' . $usr_id . ' ORDER BY c.view_order, f.view_order');
$pc = '';
while ($r = db_rowarr($c)) {
if ($pc != $r[0]) {
echo '<tr class="fieldtopic"><td colspan=2>' . $r[0] . '</td></tr>';
$pc = $r[0];
}
echo '<tr class="field"><td><input type="checkbox" name="mod_allow[]" value="' . $r[2] . '"' . ($r[3] ? ' checked' : '') . '>' . $r[1] . '</td></tr>';
}
?>
<tr class="fieldaction">
<td colspan=2 align=right><input type="submit" name="mod_submit" value="Apply"></td>
</tr>
</table>
<input type="hidden" name="usr_id" value="<?php
echo $usr_id;
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admmodfrm.php
示例14: create_theme_select
function create_theme_select($name, $def = null)
{
$theme_select_values = '';
$r = uq("SELECT id, name FROM phpgw_fud_themes WHERE theme_opt>=1 AND (theme_opt & 1) > 0 ORDER BY ((theme_opt & 2) > 0) DESC");
while ($t = db_rowarr($r)) {
$selected = $t[0] == $def ? ' selected' : '';
$theme_select_values .= '<option value="' . $t[0] . '"' . $selected . '>' . $t[1] . '</option>';
}
return '<select name="' . $name . '">
' . $theme_select_values . '
</select>';
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:12,代码来源:register.php
示例15: array
<td valign="top"><b>Group Name</b></td>
<?php
$src = array('!\\s!', '!([A-Za-z]{1})!\\e');
$dst = array('', '\\1<br />');
foreach ($hdr as $k => $v) {
echo '<td align="center" valign="top" title="' . $v[1] . '"><b>';
echo preg_replace('!([^0]{1})!e', "strtoupper('\\1').'<br />'", $v[1]);
echo '</b></td>';
}
?>
<td valign="top"><b>Leaders</b></td>
<td valign="top" align="center"><b>Actions</b></td>
</tr>
<?php
/* fetch all group leaders */
$c = uq('SELECT gm.group_id, u.alias FROM ' . $DBHOST_TBL_PREFIX . 'group_members gm INNER JOIN ' . $DBHOST_TBL_PREFIX . 'users u ON gm.user_id=u.id WHERE gm.group_members_opt>=131072 AND (gm.group_members_opt & 131072) > 0');
while ($r = db_rowarr($c)) {
$gll[$r[0]][] = $r[1];
}
foreach ($gl as $k => $v) {
if (isset($gll[$k])) {
$grl = '<font size="-1">(total: ' . count($gll[$k]) . ')</font><br><select name="gr_leaders"><option>' . implode('</option><option>', $gll[$k]) . '</option></select>';
} else {
$grl = 'No Leaders';
}
$del_link = !$v['forum_id'] ? '[<a href="admgroups.php?del=' . $k . '&' . _rsidl . '">Delete</a>]' : '';
$user_grp_mgr = $k > 2 ? ' ' . $del_link . '<br>[<a href="admgrouplead.php?group_id=' . $k . '&' . _rsidl . '">Manage Leaders</a>] [<a href="../' . __fud_index_name__ . '?t=groupmgr&group_id=' . $k . '&' . _rsidl . '" target=_new>Manage Users</a>]' : '';
echo '<tr class="tiny field"><td><a name="g' . $k . '">' . $v['gn'] . '</a></td>';
foreach ($hdr as $v2) {
echo '<td nowrap align="center" title="' . $v2[1] . '">';
if ($v['inherit_id'] && $v['groups_opti'] & $v2[0]) {
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admgroups.php
示例16: uq
</tr>
<input type="hidden" name="edit" value="<?php
echo $edit;
?>
">
</form>
</table>
<p>
<table class="resulttable fulltable">
<tr class="resulttopic">
<td>Icon</td>
<td>MIME Header</td>
<td>Description</td>
<td>Extension</td>
<td align="center">Action</td>
</tr>
<?php
$c = uq('SELECT id, icon, mime_hdr, fl_ext, descr FROM ' . $tbl . 'mime');
$i = 1;
while ($r = db_rowarr($c)) {
if ($edit == $r[0]) {
$bgcolor = ' class="resultrow1"';
} else {
$bgcolor = $i++ % 2 ? ' class="resultrow2""' : ' class="resultrow1"';
}
echo '<tr' . $bgcolor . ' valign="top"><td><img src="' . $GLOBALS['WWW_ROOT'] . 'images/mime/' . $r[1] . '" border=0></td><td>' . $r[2] . '</td><td>' . $r[4] . '</td><td>' . $r[3] . '</td><td nowrap>[<a href="admmime.php?edit=' . $r[0] . '&' . _rsidl . '#img">Edit</a>] [<a href="admmime.php?del=' . $r[0] . '&' . _rsidl . '">Delete</a>]</td></tr>';
}
?>
</table>
<?php
require $WWW_ROOT_DISK . 'adm/admclose.php';
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admmime.php
示例17: uq
</form>
<table class="resulttable fulltable">
<tr class="resulttopic">
<td>Name</td>
<td>Theme</td>
<td>Language</td>
<td>Locale</td>
<td>pSpell Lang</td>
<td>Enabled</td>
<td>Default</td>
<td>Action</td>
</tr>
<?php
$i = 1;
$c = uq('SELECT * FROM ' . $DBHOST_TBL_PREFIX . 'themes ORDER BY id');
while ($r = db_rowobj($c)) {
if ($edit == $r->id) {
$bgcolor = ' class="resultrow1"';
} else {
$bgcolor = $i++ % 2 ? ' class="resultrow2"' : ' class="resultrow1"';
}
echo '<tr ' . $bgcolor . '>
<td>' . htmlspecialchars($r->name) . '</td>
<td>' . htmlspecialchars($r->theme) . '</td>
<td>' . htmlspecialchars($r->lang) . '</td>
<td>' . htmlspecialchars($r->locale) . '</td>
<td>' . (!$r->pspell_lang ? '<font color="green">disabled</font> ' : htmlspecialchars($r->pspell_lang)) . '</td>
<td>' . ($r->theme_opt & 1 ? 'Yes' : '<font color="green">No</font>') . '</td>
<td>' . ($r->theme_opt & 2 ? 'Yes' : '<font color="green">No</font>') . '</td>
<td nowrap>[<a href="admthemes.php?' . _rsidl . '&edit=' . $r->id . '">Edit</a>] [<a href="admthemes.php?' . _rsidl . '&rebuild=' . $r->id . '">Rebuild Theme</a>]
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admthemes.php
示例18: get_fud_table_list
function get_fud_table_list()
{
$r = uq("SHOW TABLES LIKE '" . str_replace("_", "\\_", $GLOBALS['DBHOST_TBL_PREFIX']) . "%'");
while (list($ret[]) = db_rowarr($r)) {
}
array_pop($ret);
return $ret;
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:8,代码来源:rdf.php
示例19: OR
INNER JOIN phpgw_fud_group_cache g1 ON g1.user_id=' . (_uid ? '2147483647' : '0') . ' AND g1.resource_id=p.forum_id
LEFT JOIN phpgw_fud_group_cache g2 ON g2.user_id=' . _uid . ' AND g2.resource_id=p.forum_id
WHERE
' . $usr_lmt . ($usr->users_opt & 1048576 ? ' 1=1' : ' (mm.id IS NOT NULL OR ((CASE WHEN g2.id IS NOT NULL THEN g2.group_cache_opt ELSE g1.group_cache_opt END) & 2) > 0)'));
$poll_entries = $pager = '';
if ($ttl) {
$c = uq('SELECT
p.owner, p.name, (CASE WHEN expiry_date = 0 THEN 0 ELSE (p.creation_date + p.expiry_date) END) AS poll_expiry_date, p.creation_date, p.id AS poid, p.max_votes, p.total_votes,
u.alias, u.alias AS login, (u.last_visit + ' . $LOGEDIN_TIMEOUT * 60 . ') AS last_visit, u.users_opt,
m.id,
t.thread_opt,
' . ($usr->users_opt & 1048576 ? '1' : 'mm.id') . ' AS md,
pot.id AS cant_vote,
(CASE WHEN g2.id IS NOT NULL THEN g2.group_cache_opt ELSE g1.group_cache_opt END) AS gco
FROM phpgw_fud_poll p
INNER JOIN phpgw_fud_group_cache g1 ON g1.user_id=' . (_uid ? '2147483647' : '0') . ' AND g1.resource_id=p.forum_id
INNER JOIN phpgw_fud_forum f ON p.forum_id=f.id
INNER JOIN phpgw_fud_cat c ON c.id=f.cat_id
INNER JOIN phpgw_fud_msg m ON m.poll_id=p.id
INNER JOIN phpgw_fud_thread t ON m.thread_id=t.id
LEFT JOIN phpgw_fud_group_cache g2 ON g2.user_id=' . _uid . ' AND g2.resource_id=p.forum_id
LEFT JOIN phpgw_fud_mod mm ON mm.forum_id=p.forum_id AND mm.user_id=' . _uid . '
LEFT JOIN phpgw_fud_users u ON u.id=m.poster_id
LEFT JOIN phpgw_fud_poll_opt_track pot ON pot.poll_id=p.id AND pot.user_id=' . _uid . '
WHERE
' . $usr_lmt . ' ' . ($usr->users_opt & 1048576 ? '1=1' : '(mm.id IS NOT NULL OR ((CASE WHEN g2.id IS NOT NULL THEN g2.group_cache_opt ELSE g1.group_cache_opt END) & 2) > 0)') . ' ORDER BY p.creation_date ' . $oby . ' LIMIT ' . qry_limit($POLLS_PER_PAGE, $start));
while ($obj = db_rowobj($c)) {
if (!$obj->total_votes) {
$obj->total_votes = '0';
}
$vote_lnk = '';
if (!$obj->cant_vote && (!$obj->poll_expiry_date || $obj->poll_expiry_date < __request_timestamp__)) {
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:32,代码来源:polllist.php
示例20: uq
<input type="hidden" name="edit" value="<?php
echo $edit;
?>
">
</form>
<table class="resulttable fulltable">
<tr class="resulttopic">
<td>Subject</td>
<td>Body</td>
<td>Starting Date</td>
<td>Ending Date</td>
<td>Action</td>
</tr>
<?php
$c = uq('SELECT * FROM ' . $tbl . 'announce ORDER BY date_started');
$i = 1;
while ($r = db_rowobj($c)) {
if ($edit == $r->id) {
$bgcolor = ' class="resultrow1"';
} else {
$bgcolor = $i++ % 2 ? ' class="resultrow2"' : ' class="resultrow1"';
}
$b = htmlspecialchars(strlen($r->text) > 25 ? substr($r->text, 0, 25) . '...' : $r->text);
$st_dt = raw_date($r->date_started);
$st_dt = gmdate('F j, Y', gmmktime(1, 1, 1, $st_dt[1], $st_dt[2], $st_dt[0]));
$en_dt = raw_date($r->date_ended);
$en_dt = gmdate('F j, Y', gmmktime(1, 1, 1, $en_dt[1], $en_dt[2], $en_dt[0]));
echo '<tr' . $bgcolor . '><td>' . $r->subject . '</td><td>' . $b . '</td><td>' . $st_dt . '</td><td>' . $en_dt . '</td><td>[<a href="admannounce.php?edit=' . $r->id . '&' . _rsidl . '">Edit</a>] [<a href="admannounce.php?del=' . $r->id . '&' . _rsidl . '">Delete</a>]</td></tr>';
}
?>
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admannounce.php
注:本文中的uq函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论