• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fud_use函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fud_use函数的典型用法代码示例。如果您正苦于以下问题:PHP fud_use函数的具体用法?PHP fud_use怎么用?PHP fud_use使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fud_use函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: send_email

function send_email($from, $to, $subj, $body, $header = '')
{
    if (empty($to) || !count($to)) {
        return;
    }
    $body = str_replace('\\n', "\n", $body);
    if ($GLOBALS['FUD_OPT_1'] & 512) {
        if (!class_exists('fud_smtp')) {
            fud_use('smtp.inc');
        }
        $smtp = new fud_smtp();
        $smtp->msg = str_replace("\n.", "\n..", $body);
        $smtp->subject = $subj;
        $smtp->to = $to;
        $smtp->from = $from;
        $smtp->headers = $header;
        $smtp->send_smtp_email();
    } else {
        $bcc = '';
        if (is_array($to)) {
            $to = $to[0];
            if (count($to) > 1) {
                unset($to[0]);
                $bcc = 'Bcc: ' . implode(', ', $to);
            }
        }
        if ($header) {
            $header = "\n" . str_replace("\r", "", $header);
        } else {
            if ($bcc) {
                $bcc = "\n" . $bcc;
            }
        }
        if (version_compare("4.3.3RC2", phpversion(), ">")) {
            $body = str_replace("\n.", "\n..", $body);
        }
        mail($to, $subj, str_replace("\r", "", $body), "From: " . $from . "\nErrors-To: " . $from . "\nReturn-Path: " . $from . "\nX-Mailer: FUDforum v" . $GLOBALS['FORUM_VERSION'] . $header . $bcc);
    }
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:39,代码来源:email.php


示例2: all_hooks

 function all_hooks($args)
 {
     if (!function_exists('db_saq')) {
         fud_use('db.inc');
     }
     $GLOBALS['adm_file'] = array();
     list($GLOBALS['fudh_uopt'], $theme_name) = db_saq("SELECT u.users_opt, t.name FROM phpgw_fud_users u INNER JOIN phpgw_fud_themes t ON t.id=u.theme WHERE u.id!=1 AND u.egw_id=" . (int) $GLOBALS['phpgw_info']['user']['account_id']);
     $GLOBALS['fudh_uopt'] = (int) $GLOBALS['fudh_uopt'];
     if (!empty($GLOBALS['phpgw_info']['user']['apps']['admin'])) {
         $GLOBALS['fudh_uopt'] |= 1048576;
     }
     include_once $GLOBALS['DATA_DIR'] . 'include/theme/' . str_replace(' ', '_', $theme_name) . '/usercp.inc';
     /* regular user links */
     //print_r ($GLOBALS);
     if (!empty($GLOBALS['t']) && $GLOBALS['last_loginid'] != 'anonymous') {
         display_sidebox('fudforum', lang('Preferences'), $GLOBALS['usr_file']);
     }
     /* admin stuff */
     if ($GLOBALS['adm_file']) {
         display_sidebox('fudforum', lang('Administration'), $GLOBALS['adm_file']);
     }
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:22,代码来源:class.fud_sidebox_hooks.inc.php


示例3: change_global_settings

     }
 }
 for ($i = 1; $i < 10; $i++) {
     if (!isset($GLOBALS['FUD_OPT_' . $i])) {
         break;
     }
     if ($GLOBALS['FUD_OPT_' . $i] != $GLOBALS['NEW_FUD_OPT_' . $i]) {
         $ch_list['FUD_OPT_' . $i] = $GLOBALS['NEW_FUD_OPT_' . $i];
     }
 }
 if (isset($ch_list)) {
     change_global_settings($ch_list);
     /* some fields require us to make special changes */
     if (isset($ch_list['SHOW_N_MODS'])) {
         $GLOBALS['SHOW_N_MODS'] = $ch_list['SHOW_N_MODS'];
         fud_use('users_reg.inc');
         rebuildmodlist();
     }
     /* Handle disabling of aliases */
     if (($FUD_OPT_2 ^ $NEW_FUD_OPT_2) & 128 && !($NEW_FUD_OPT_2 & 128)) {
         q('UPDATE ' . $DBHOST_TBL_PREFIX . 'users SET alias=login');
         rebuildmodlist();
     }
     /* Topic/Message tree view disabling code */
     $o = 0;
     if (($FUD_OPT_2 ^ $NEW_FUD_OPT_2) & 512 && !($NEW_FUD_OPT_2 & 512)) {
         $o |= 128;
     }
     if (($FUD_OPT_3 ^ $NEW_FUD_OPT_3) & 2 && !($NEW_FUD_OPT_3 & 2)) {
         $o |= 256;
     }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admglobal.php


示例4: fud_egw

* email                : [email protected]
* $Id: indexdb.php,v 1.2 2003/12/18 16:42:31 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.
***************************************************************************/
@set_time_limit(2400);
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('glob.inc', true);
fud_use('isearch.inc');
fud_use('fileio.inc');
fud_use('rev_fmt.inc');
require $WWW_ROOT_DISK . 'adm/admpanel.php';
if (!isset($_POST['conf'])) {
    ?>
<form method="post" action="indexdb.php">
<div class="alert">
This script will attempt to rebuild the search indices for the entire forum. This is a VERY CPU-intensive process
and can take a VERY LONG time, especially on large forums. You should ONLY run this if you absolutely must.
</div>
<h2>Do you wish to proceed?</h2>
<input type="submit" name="btn_cancel" value="No">&nbsp;&nbsp;&nbsp;<input type="submit" name="conf" value="Yes">
<?php 
    echo _hs;
    ?>
</form>
<?php 
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:indexdb.php


示例5: exit

    }
    if (!($fp = fopen($path, 'w'))) {
        exit("unable to write to " . $path . "<br>\n");
    }
    fwrite($fp, $r);
    fclose($fp);
    $saved = $old_size - strlen($r);
    return $saved;
}
$is_tok = extension_loaded('tokenizer');
require './GLOBALS.php';
fud_egw();
fud_use('widgets.inc', true);
fud_use('adm.inc', true);
fud_use('compiler.inc', true);
fud_use('theme.inc', true);
$edit = isset($_GET['edit']) ? (int) $_GET['edit'] : (isset($_POST['edit']) ? (int) $_POST['edit'] : '');
/* Limit theme names to sane characters */
if (isset($_POST['newname'])) {
    $_POST['newname'] = preg_replace('![^A-Za-z0-9_]!', '_', $_POST['newname']);
}
if (isset($_POST['newname']) && !q_singleval("SELECT id FROM " . $DBHOST_TBL_PREFIX . "themes WHERE name='" . addslashes($_POST['newname']) . "'")) {
    $root = $DATA_DIR . 'thm/';
    $root_nn = $root . preg_replace('![^A-Za-z0-9_]!', '_', $_POST['newname']);
    $u = umask(0);
    if (!@is_dir($root_nn) && !@mkdir($root_nn, 0777)) {
        exit('can\'t create (' . $root_nn . ')<br>');
    }
    $ts = $_POST['base_template_set'] == 'path_info' ? 'path_info/' : 'default/';
    fudcopy($root . $ts, $root_nn, '!.*!', true);
    umask($u);
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admthemes.php


示例6: fud_egw

/***************************************************************************
* copyright            : (C) 2001-2003 Advanced Internet Designs Inc.
* email                : [email protected]
* $Id: admmassemail.php,v 1.3 2004/02/26 21:15:42 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.
***************************************************************************/
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('widgets.inc', true);
fud_use('smtp.inc');
/* find groups with members */
$groups = array();
$c = uq('select count(*), g.id, g.name from ' . $DBHOST_TBL_PREFIX . 'group_members gm INNER JOIN ' . $DBHOST_TBL_PREFIX . 'groups g ON g.id=gm.group_id WHERE gm.user_id NOT IN(0,2147483647) GROUP BY g.id, g.name');
while (list($cnt, $gid, $gname) = db_rowarr($c)) {
    $groups[$gid] = array($gname, $cnt);
}
$err = 0;
if (!empty($_POST['subject']) && !empty($_POST['body'])) {
    if (!$_POST['group']) {
        $c = uq('SELECT email FROM ' . $DBHOST_TBL_PREFIX . 'users ' . (isset($POST['ignore_override']) ? '' : 'WHERE (users_opt & 8)=0'));
    } else {
        if (!isset($groups[$_POST['group']])) {
            echo '<font color="+1" color="red">Invalid group id</font><br />';
            $err = 1;
            $c = uq('SELECT id FROM ' . $DBHOST_TBL_PREFIX . 'users WHERE id=-1');
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:30,代码来源:admmassemail.php


示例7: format_regex

function format_regex(&$regex)
{
    if (empty($regex)) {
        return;
    }
    $s = strpos($regex, '/') + 1;
    $e = strrpos($regex, '/');
    $ret = substr($regex, $e + 1);
    $regex = substr($regex, $s, $e - $s);
    return $ret;
}
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('widgets.inc', true);
fud_use('mlist.inc', true);
$tbl = $GLOBALS['DBHOST_TBL_PREFIX'];
$edit = isset($_GET['edit']) ? (int) $_GET['edit'] : (isset($_POST['edit']) ? (int) $_POST['edit'] : '');
if (isset($_POST['ml_forum_id'])) {
    $mlist = new fud_mlist();
    if ($edit) {
        $mlist->sync($edit);
        $edit = '';
    } else {
        $mlist->add();
    }
} else {
    if (isset($_GET['del'])) {
        fud_mlist::del((int) $_GET['del']);
    }
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admmlist.php


示例8: fud_egw

<?php

/***************************************************************************
* copyright            : (C) 2001-2003 Advanced Internet Designs Inc.
* email                : [email protected]
* $Id: admmime.php,v 1.2 2003/12/18 16:42:31 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.
***************************************************************************/
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('widgets.inc', true);
$tbl = $GLOBALS['DBHOST_TBL_PREFIX'];
if (isset($_GET['del'])) {
    q('DELETE FROM ' . $tbl . 'mime WHERE id=' . (int) $_GET['del']);
}
if (isset($_GET['edit'])) {
    list($mime_descr, $mime_mime_hdr, $mime_fl_ext, $mime_icon) = db_saq('SELECT descr, mime_hdr, fl_ext, icon FROM ' . $tbl . 'mime WHERE id=' . (int) $_GET['edit']);
    $edit = (int) $_GET['edit'];
} else {
    $mime_icon = $edit = $mime_descr = $mime_mime_hdr = $mime_fl_ext = '';
}
if (isset($_FILES['icoul']) && $_FILES['icoul']['size'] && preg_match('!\\.(jpg|jpeg|gif|png)$!i', $_FILES['icoul']['name'])) {
    move_uploaded_file($_FILES['icoul']['tmp_name'], $GLOBALS['WWW_ROOT_DISK'] . 'images/mime/' . $_FILES['icoul']['name']);
    if (empty($_POST['mime_icon'])) {
        $_POST['mime_icon'] = $_FILES['icoul']['name'];
    }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admmime.php


示例9: fud_egw

/***************************************************************************
* copyright            : (C) 2001-2003 Advanced Internet Designs Inc.
* email                : [email protected]
* $Id: admnntp.php,v 1.3 2003/12/18 16:42:31 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.
***************************************************************************/
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('widgets.inc', true);
fud_use('nntp_adm.inc', true);
$tbl = $GLOBALS['DBHOST_TBL_PREFIX'];
$edit = isset($_GET['edit']) ? (int) $_GET['edit'] : (isset($_POST['edit']) ? (int) $_POST['edit'] : '');
if (isset($_POST['nntp_forum_id'])) {
    $nntp_adm = new fud_nntp_adm();
    if ($edit) {
        $nntp_adm->sync($edit);
        $edit = '';
    } else {
        $nntp_adm->add();
    }
} else {
    if (isset($_GET['del'])) {
        nntp_del((int) $_GET['del']);
    }
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:30,代码来源:admnntp.php


示例10: fud_egw

*
* 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.
***************************************************************************/
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('forum_adm.inc', true);
$tbl = $GLOBALS['DBHOST_TBL_PREFIX'];
/* restore forum */
if (isset($_POST['frm_id'], $_POST['dst_cat'])) {
    $pos = (int) q_singleval('SELECT MAX(view_order) FROM ' . $tbl . 'forum WHERE cat_id=' . (int) $_POST['dst_cat']) + 1;
    q('UPDATE ' . $tbl . 'forum SET cat_id=' . (int) $_POST['dst_cat'] . ', view_order=' . $pos . ' WHERE id=' . (int) $_POST['frm_id']);
    fud_use('cat.inc', true);
    rebuild_forum_cat_order();
} else {
    if (isset($_GET['del']) && ($f = db_saq('SELECT id, thread_count, post_count, name FROM ' . $tbl . 'forum WHERE id=' . (int) $_GET['del']))) {
        /* user considers deleting a forum, give them final confirmation check */
        ?>
<html>
<body bgcolor="#ffffff">
<div align="center">
<h3>You have selected to delete this forum</h3><br>
"<?php 
        echo $f[3];
        ?>
" which contains <?php 
        echo $f[1];
        ?>
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admdelfrm.php


示例11: fud_egw

<?php

/***************************************************************************
* copyright            : (C) 2001-2003 Advanced Internet Designs Inc.
* email                : [email protected]
* $Id: admlock.php,v 1.3 2004/07/08 14:25:47 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.
***************************************************************************/
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('glob.inc', true);
function chmoddir($dirn, $dirp, $filep, $rec = false)
{
    @chmod($dirn, $dirp);
    if (!($d = opendir($dirn))) {
        echo 'ERROR: Unable to open "' . $dirn . '" directory<br>';
        return;
    }
    while ($f = readdir($d)) {
        if ($f == '.' || $f == '..') {
            continue;
        }
        $path = $dirn . '/' . $f;
        if (@is_file($path) && !@chmod($path, $filep)) {
            echo 'ERROR: couldn\'t chmod "' . $path . '"<br>';
        } else {
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admlock.php


示例12: fud_egw

<?php

/***************************************************************************
* copyright            : (C) 2001-2003 Advanced Internet Designs Inc.
* email                : [email protected]
* $Id: admext.php,v 1.2 2003/12/18 16:42:31 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.
***************************************************************************/
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('ext.inc', true);
$tbl = $GLOBALS['DBHOST_TBL_PREFIX'];
if (!empty($_POST['c_ext'])) {
    if (($p = strrpos($_POST['c_ext'], '.')) !== false) {
        $c_ext = rtrim(substr($_POST['c_ext'], $p + 1));
    } else {
        $c_ext = trim($_POST['c_ext']);
    }
}
if (isset($_POST['edit'], $_POST['btn_update']) && $c_ext) {
    q('UPDATE ' . $tbl . 'ext_block SET ext=\'' . addslashes($c_ext) . '\' WHERE id=' . (int) $_POST['edit']);
} else {
    if (isset($_POST['btn_submit']) && $c_ext) {
        q('INSERT INTO ' . $tbl . 'ext_block (ext) VALUES(\'' . addslashes($c_ext) . '\')');
    } else {
        if (isset($_GET['del'])) {
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admext.php


示例13: db_unlock

        }
    }
    if (isset($ll)) {
        db_unlock();
    }
}
$th = isset($_POST['th']) ? (int) $_POST['th'] : (isset($_GET['th']) ? (int) $_GET['th'] : 0);
$thx = isset($_POST['thx']) ? (int) $_POST['thx'] : (isset($_GET['thx']) ? (int) $_GET['thx'] : 0);
$to = isset($_GET['to']) ? (int) $_GET['to'] : 0;
/* thread x-change */
if ($th && $thx) {
    if (!($usr->users_opt & 1048576) && q_singleval('SELECT id FROM phpgw_fud_mod WHERE forum_id=' . $thx . ' AND user_id=' . _uid)) {
        std_error('access');
    }
    if (!empty($_POST['reason_msg'])) {
        fud_use('thrx_adm.inc', true);
        if (thx_add($_POST['reason_msg'], $th, $thx, _uid)) {
            logaction(_uid, 'THRXREQUEST', $th);
        }
        exit('<html><script>window.close();</script></html>');
    } else {
        $thr = db_sab('SELECT f.name AS frm_name, m.subject FROM phpgw_fud_forum f INNER JOIN phpgw_fud_thread t ON t.id=' . $th . ' INNER JOIN phpgw_fud_msg m ON t.root_msg_id=m.id WHERE f.id=' . $thx);
        $table_data = '<tr><td><font size="-1"><b>' . htmlspecialchars($thr->frm_name) . '</b></font></td></tr>
<tr><td><font size="-1">Perchè vuoi che il topic sia spostato?</font><br /><textarea name="reason_msg" rows=7 cols=30></textarea><td></tr>
<tr><td align="right"><input type="submit" class="button" name="submit" value="Invia la richiesta"></td></tr>';
    }
}
/* moving a thread */
if ($th && $to) {
    $thr = db_sab('SELECT
				t.id, t.forum_id, t.last_post_id, t.root_msg_id, t.last_post_date, t.last_post_id,
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:mvthread.php


示例14: fud_egw

/***************************************************************************
* copyright            : (C) 2001-2003 Advanced Internet Designs Inc.
* email                : [email protected]
* $Id: admrdf.php,v 1.2 2003/12/18 16:42:31 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.
***************************************************************************/
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('glob.inc', true);
fud_use('widgets.inc', true);
fud_use('draw_select_opt.inc');
$help_ar = read_help();
if (isset($_POST['form_posted'])) {
    $NEW_FUD_OPT_2 = 0;
    foreach ($_POST as $k => $v) {
        if (!strncmp($k, 'CF_', 3)) {
            $k = substr($k, 3);
            if (!isset($GLOBALS[$k]) || $GLOBALS[$k] != $v) {
                $ch_list[$k] = is_numeric($v) ? (int) $v : $v;
            }
        } else {
            if (!strncmp($k, 'FUD_OPT_2', 9)) {
                $NEW_FUD_OPT_2 |= (int) $v;
            }
        }
    }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admrdf.php


示例15: fud_egw

*
* 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.
***************************************************************************/
@set_time_limit(6000);
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('widgets.inc', true);
fud_use('imsg_edt.inc');
fud_use('th.inc');
fud_use('ipoll.inc');
fud_use('attach.inc');
fud_use('th_adm.inc');
if (isset($_POST['btn_prune']) && !empty($_POST['thread_age'])) {
    /* figure out our limit if any */
    if ($_POST['forumsel'] == '0') {
        $lmt = '';
        $msg = '<font color="red">from all forums</font>';
    } else {
        if (!strncmp($_POST['forumsel'], 'cat_', 4)) {
            $c = uq('SELECT id FROM ' . $DBHOST_TBL_PREFIX . 'forum WHERE cat_id=' . (int) substr($_POST['forumsel'], 4));
            while ($r = db_rowarr($c)) {
                $l[] = $r[0];
            }
            if ($lmt = implode(',', $l)) {
                $lmt = ' AND forum_id IN(' . $lmt . ') ';
            }
            $msg = '<font color="red">from all forums in category "' . q_singleval('SELECT name FROM ' . $DBHOST_TBL_PREFIX . 'cat WHERE id=' . (int) substr($_POST['forumsel'], 4)) . '"</font>';
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admprune.php


示例16: fud_egw

<?php

/***************************************************************************
* copyright            : (C) 2001-2003 Advanced Internet Designs Inc.
* email                : [email protected]
* $Id: admipfilter.php,v 1.2 2003/12/18 16:42:31 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.
***************************************************************************/
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
fud_use('ipfilter.inc', true);
/* validate the address */
$bits = null;
if (isset($_POST['ipaddr'])) {
    $bits = explode('.', trim($_POST['ipaddr']));
    foreach ($bits as $k => $v) {
        $bits[$k] = $v == '..' || $v == '*' || !$v && $v !== '0' ? 256 : (int) $v;
    }
    for ($i = count($bits); $i < 4; $i++) {
        $bits[$i] = 256;
    }
}
$tbl = $GLOBALS['DBHOST_TBL_PREFIX'];
if (isset($_POST['edit'], $_POST['btn_update']) && isset($bits)) {
    q('UPDATE ' . $tbl . 'ip_block SET ca=' . $bits[0] . ', cb=' . $bits[1] . ', cc=' . $bits[2] . ', cd=' . $bits[3] . ' WHERE id=' . (int) $_POST['edit']);
} else {
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admipfilter.php


示例17: unset

    }
    unset($GLOBALS['__MSG_FP__']);
}
function read_msg_body($off, $len, $file_id)
{
    $fp = register_fp($file_id);
    fseek($fp, $off);
    return fread($fp, $len);
}
function reverse_fmt(&$data)
{
    $data = str_replace(array('&amp;', '&quot;', '&lt;', '&gt;'), array('&', '"', '<', '>'), $data);
}
if (!($FUD_OPT_2 & 16777216) || !($FUD_OPT_2 & 67108864) && $mode == 'u') {
    fud_use('cookies.inc');
    fud_use('users.inc');
    std_error('disabled');
}
if ($FUD_OPT_2 & 16384) {
    ob_start(array('ob_gzhandler', $PHP_COMPRESSION_LEVEL));
}
function sp($data)
{
    return '<![CDATA[' . str_replace(array('[', ']'), array('&#91;', '&#93;'), $data) . ']]>';
}
function email_format($data)
{
    return str_replace(array('.', '@'), array(' dot ', ' at '), $data);
}
function multi_id($data)
{
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:rdf.php


示例18: fud_egw

<?php

/***************************************************************************
* copyright            : (C) 2001-2003 Advanced Internet Designs Inc.
* email                : [email protected]
* $Id: admsysinfo.php,v 1.2 2003/12/18 16:42:31 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.
***************************************************************************/
require './GLOBALS.php';
fud_egw();
fud_use('adm.inc', true);
function get_php_setting($val)
{
    $r = ini_get($val) == '1' ? 1 : 0;
    return $r ? 'ON' : 'OFF';
}
function get_server_software()
{
    if (isset($_SERVER['SERVER_SOFTWARE'])) {
        return $_SERVER['SERVER_SOFTWARE'];
    } else {
        if ($sf = getenv('SERVER_SOFTWARE')) {
            return $sf;
        } else {
            return 'n/a';
        }
    }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:admsysinfo.php


示例19: q

            }
            q('UPDATE phpgw_fud_group_members SET group_members_opt=' . $perm . ' WHERE id=' . (int) $_POST['edit']);
            grp_rebuild_cache(array($usr_id));
        }
    }
    if (!$login_error) {
        unset($_POST);
        $gr_member = '';
    }
}
if (isset($_GET['del']) && ($del = (int) $_GET['del']) && $group_id) {
    $is_gl = q_singleval("SELECT user_id FROM phpgw_fud_group_members WHERE group_id=" . $group_id . " AND user_id=" . $del . " AND group_members_opt>=131072 AND (group_members_opt & 131072) > 0");
    grp_delete_member($group_id, $del);
    /* if the user was a group moderator, rebuild moderation cache */
    if ($is_gl) {
        fud_use('groups_adm.inc', true);
        rebuild_group_ldr_cache($del);
    }
}
$edit = 0;
if (isset($_GET['edit']) && ($edit = (int) $_GET['edit'])) {
    if (!($mbr = db_sab('SELECT gm.*, u.alias FROM phpgw_fud_group_members gm LEFT JOIN phpgw_fud_users u ON u.id=gm.user_id WHERE gm.group_id=' . $group_id . ' AND gm.id=' . $edit))) {
        invl_inp_err();
    }
    if ($mbr->user_id == 0) {
        $gr_member = '<font class="anon">Anonimo</font>';
    } else {
        if ($mbr->user_id == '2147483647') {
            $gr_member = '<font class="reg">Tutti gli utenti registrati</font>';
        } else {
            $gr_member = $mbr->alias;
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:groupmgr.php


示例20: exit

     exit('Section parameter not avaliable<br>');
 }
 if (($sdata = fetch_section($data, $f_path, $tmpl, $tmpl_type)) === false) {
     exit('Couldn\'t locate template "' . $tmpl . '" inside "' . $f_path . '"<br>');
 }
 if (!isset($_POST['submitted'])) {
     $tmpl_data = $sdata['data'];
 } else {
     $tmpl_data = $_POST['tmpl_data'];
     $data = substr_replace($data, str_replace("\r", '', $tmpl_data), $sdata['offset'], $sdata['len']);
     if (!($fp = fopen($f_path, 'wb'))) {
         exit('unable to save modifications to "' . $f_path . '"');
     }
     fwrite($fp, $data);
     fclose($fp);
     fud_use('compiler.inc', true);
     $c = q("SELECT theme FROM " . $GLOBALS['DBHOST_TBL_PREFIX'] . "themes WHERE theme='" . addslashes($tname) . "' AND lang='" . addslashes($tlang) . "'");
     while ($r = db_rowarr($c)) {
         compile_all($tname, $tlang, $r[0]);
     }
     unset($c);
     $update_ok = 1;
 }
 $p = 0;
 while (($p = strpos($tmpl_data, '{MSG: ', $p)) !== false) {
     $p += 6;
     $e = strpos($tmpl_data, '}', $p);
     $msg_list[] = substr($tmpl_data, $p, $e - $p);
     $p = $e;
 }
 if (isset($msg_list)) {
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:tmpllist.php



注:本文中的fud_use函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fuel_edit函数代码示例发布时间:2022-05-15
下一篇:
PHP fud_egw函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap