当前位置: 首页>>代码示例>>PHP>>正文


PHP fud_use函数代码示例

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


在下文中一共展示了fud_use函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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                : forum@prohost.org
* $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                : forum@prohost.org
* $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                : forum@prohost.org
* $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                : forum@prohost.org
* $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                : forum@prohost.org
* $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                : forum@prohost.org
* $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                : forum@prohost.org
* $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


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