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


PHP COM_refresh函数代码示例

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


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

示例1: testRefresh

 public function testRefresh()
 {
     // Line 2794
     $url = 'http://localhost/';
     $dummy = "<html><head><meta http-equiv=\"refresh\" content=\"0; URL={$url}\"></head></html>\n";
     $this->assertEquals($dummy, COM_refresh($url));
 }
开发者ID:Geeklog-Core,项目名称:test-framework,代码行数:7,代码来源:lib-commonTest.php

示例2: MG_rebuildQuota

function MG_rebuildQuota()
{
    global $_TABLES, $_MG_CONF, $_CONF;
    $result = DB_query("SELECT album_id FROM {$_TABLES['mg_albums']}");
    while ($row = DB_fetchArray($result)) {
        MG_updateQuotaUsage($row['album_id']);
    }
    echo COM_refresh($_MG_CONF['admin_url'] . 'index.php?msg=16');
    exit;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:10,代码来源:quota.php

示例3: MG_saveUser

function MG_saveUser()
{
    global $_CONF, $_MG_CONF, $_TABLES, $_USER, $LANG_MG00, $LANG_MG01, $_POST;
    $uid = COM_applyFilter($_POST['uid'], true);
    $quota = COM_applyFilter($_POST['quota'], true) * 1048576;
    $active = COM_applyFilter($_POST['active'], true);
    $result = DB_query("SELECT uid FROM {$_TABLES['mg_userprefs']} WHERE uid=" . $uid);
    $nRows = DB_numRows($result);
    if ($nRows > 0) {
        DB_query("UPDATE {$_TABLES['mg_userprefs']} SET quota=" . $quota . ",active=" . $active . " WHERE uid=" . $uid, 1);
    } else {
        DB_query("INSERT INTO {$_TABLES['mg_userprefs']} SET uid=" . $uid . ", quota=" . $quota . ",active=" . $active, 1);
    }
    echo COM_refresh($_MG_CONF['admin_url'] . 'quotareport.php');
    exit;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:16,代码来源:edituser.php

示例4: MG_batchDeleteSession

function MG_batchDeleteSession()
{
    global $_MG_CONF, $_CONF, $_TABLES;
    if (!empty($_POST['sel'])) {
        $numItems = count($_POST['sel']);
        for ($i = 0; $i < $numItems; $i++) {
            DB_delete($_TABLES['mg_session_items'], 'session_id', $_POST['sel'][$i]);
            if (DB_error()) {
                COM_errorLog("Media Gallery Error: Error removing session items");
            }
            DB_delete($_TABLES['mg_sessions'], 'session_id', $_POST['sel'][$i]);
            if (DB_error()) {
                COM_errorLog("Media Gallery Error: Error removing session");
            }
        }
    }
    echo COM_refresh($_MG_CONF['admin_url'] . 'sessions.php');
    exit;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:19,代码来源:sessions.php

示例5: MG_batchDeleteSession

function MG_batchDeleteSession()
{
    global $_MG_CONF, $_CONF, $_TABLES, $_POST;
    $numItems = count($_POST['sel']);
    for ($i = 0; $i < $numItems; $i++) {
        $sql = "DELETE FROM {$_TABLES['mg_session_items']} WHERE session_id='" . $_POST['sel'][$i] . "'";
        $result = DB_query($sql);
        if (DB_error()) {
            COM_errorLog("Media Gallery Error: Error removing session items");
        }
        $sql = "DELETE FROM {$_TABLES['mg_sessions']} WHERE session_id='" . $_POST['sel'][$i] . "'";
        $result = DB_query($sql);
        if (DB_error()) {
            COM_errorLog("Media Gallery Error: Error removing session");
        }
    }
    echo COM_refresh($_MG_CONF['admin_url'] . 'sessions.php');
    exit;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:19,代码来源:sessions.php

示例6: MG_rebuildQuota

function MG_rebuildQuota()
{
    global $_TABLES, $_MG_CONF, $_CONF;
    $res1 = DB_query("SELECT album_id FROM {$_TABLES['mg_albums']}");
    while ($row = DB_fetchArray($res1)) {
        $quota = 0;
        $sql = "SELECT m.media_filename, m.media_mime_ext FROM {$_TABLES['mg_media_albums']} as ma INNER JOIN " . $_TABLES['mg_media'] . " as m " . " ON ma.media_id=m.media_id WHERE ma.album_id=" . $row['album_id'];
        $result = DB_query($sql);
        while (list($filename, $mimeExt) = DB_fetchArray($result)) {
            if ($_MG_CONF['discard_original'] == 1) {
                $quota += @filesize($_MG_CONF['path_mediaobjects'] . 'orig/' . $filename[0] . '/' . $filename . '.' . $mimeExt);
                $quota += @filesize($_MG_CONF['path_mediaobjects'] . 'disp/' . $filename[0] . '/' . $filename . '.jpg');
            } else {
                $quota += @filesize($_MG_CONF['path_mediaobjects'] . 'orig/' . $filename[0] . '/' . $filename . '.' . $mimeExt);
            }
        }
        DB_query("UPDATE {$_TABLES['mg_albums']} SET album_disk_usage=" . $quota . " WHERE album_id=" . $row['album_id']);
    }
    echo COM_refresh($_MG_CONF['admin_url'] . 'index.php?msg=16');
    exit;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:21,代码来源:quota.php

示例7: MG_rotateMedia

function MG_rotateMedia($album_id, $media_id, $direction, $actionURL = '')
{
    global $_TABLES, $_MG_CONF;
    $sql = "SELECT * FROM " . $_TABLES['mg_media'] . " WHERE media_id='" . DB_escapeString($media_id) . "'";
    $result = DB_query($sql);
    $numRows = DB_numRows($result);
    if ($numRows == 0) {
        $sql = "SELECT * FROM " . $_TABLES['mg_mediaqueue'] . " WHERE media_id='" . DB_escapeString($media_id) . "'";
        $result = DB_query($sql);
        $numRows = DB_numRows($result);
    }
    if ($numRows == 0) {
        COM_errorLog("MG_rotateMedia: Unable to retrieve media object data");
        if ($actionURL == '') {
            return false;
        }
        echo COM_refresh($actionURL);
        exit;
    }
    $row = DB_fetchArray($result);
    $filename = $row['media_filename'];
    $media_size = false;
    foreach ($_MG_CONF['validExtensions'] as $ext) {
        if (file_exists($_MG_CONF['path_mediaobjects'] . 'tn/' . $filename[0] . '/' . $filename . $ext)) {
            $tn = $_MG_CONF['path_mediaobjects'] . 'tn/' . $filename[0] . '/' . $filename . $ext;
            $disp = $_MG_CONF['path_mediaobjects'] . 'disp/' . $filename[0] . '/' . $filename . $ext;
            break;
        }
    }
    $orig = $_MG_CONF['path_mediaobjects'] . 'orig/' . $filename[0] . '/' . $filename . '.' . $row['media_mime_ext'];
    list($rc, $msg) = IMG_rotateImage($tn, $direction);
    list($rc, $msg) = IMG_rotateImage($disp, $direction);
    list($rc, $msg) = IMG_rotateImage($orig, $direction);
    if ($actionURL == -1 || $actionURL == '') {
        return true;
    }
    echo COM_refresh($actionURL . '&t=' . time());
    exit;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:39,代码来源:rotate.php

示例8: DB_copy

/**
* Copies a record from one table to another (can be the same table)
*
* This will use a REPLACE INTO...SELECT FROM to copy a record from one table
* to another table.  They can be the same table.
*
* @param        string          $table          Table to insert record into
* @param        string          $fields         Comma delmited list of fields to copy over
* @param        string          $values         Values to store in database field
* @param        string          $tablefrom      Table to get record from
* @param        array|string    $id             Field name(s) to use in where clause
* @param        array|string    $value          Value(s) to use in where clause
* @param        string          $return_page    Page to send user to when done
*
*/
function DB_copy($table, $fields, $values, $tablefrom, $id, $value, $return_page = '')
{
    global $_DB, $_TABLES, $_CONF;
    $_DB->dbCopy($table, $fields, $values, $tablefrom, $id, $value);
    if (!empty($return_page)) {
        print COM_refresh("{$return_page}");
    }
}
开发者ID:milk54,项目名称:geeklog-japan,代码行数:23,代码来源:lib-database.php

示例9: DB_query

            if (SEC_inGroup($frecord['grp_id'])) {
                DB_query("DELETE FROM {$_TABLES['ff_log']} WHERE uid=" . (int) $_USER['uid'] . " AND forum=" . (int) $frecord['forum_id'] . "");
                $tsql = DB_query("SELECT id FROM {$_TABLES['ff_topic']} WHERE forum={$frecord['forum_id']} and pid=0");
                while ($trecord = DB_fetchArray($tsql)) {
                    $log_sql = DB_query("SELECT * FROM {$_TABLES['ff_log']} WHERE uid=" . (int) $_USER['uid'] . " AND topic=" . (int) $trecord['id'] . " AND forum=" . (int) $frecord['forum_id']);
                    if (DB_numRows($log_sql) == 0) {
                        DB_query("INSERT INTO {$_TABLES['ff_log']} (uid,forum,topic,time) VALUES (" . (int) $_USER['uid'] . "," . (int) $frecord['forum_id'] . "," . (int) $trecord['id'] . ",'{$now}')");
                    }
                }
            }
        }
    }
    if ($extraWhere != '') {
        echo COM_refresh($_CONF['site_url'] . '/forum/index.php?forum=' . (int) $forum_id);
    } else {
        echo COM_refresh($_CONF['site_url'] . '/forum/index.php');
    }
    exit;
}
if ($op == 'subscribe') {
    $display = FF_siteHeader();
    if ($forum != 0) {
        $forum_name = DB_getItem($_TABLES['ff_forums'], 'forum_name', 'forum_id=' . (int) $forum);
        DB_query("INSERT INTO {$_TABLES['subscriptions']} (type,category,category_desc,id,id_desc,uid,date_added) VALUES ('forum'," . (int) $forum . ",'" . DB_escapeString($forum_name) . "',0,'" . $LANG_GF02['msg138'] . "'," . (int) $_USER['uid'] . ", now() )");
        // Delete all individual topic notification records
        DB_query("DELETE FROM {$_TABLES['subscriptions']} WHERE type='forum' AND uid=" . (int) $_USER['uid'] . " AND category=" . (int) $forum . " AND id > 0");
        $display .= FF_statusMessage($LANG_GF02['msg134'], $_CONF['site_url'] . '/forum/index.php?forum=' . $forum, $LANG_GF02['msg135']);
    } else {
        $display .= FF_BlockMessage($LANG_GF01['ERROR'], $LANG_GF02['msg136'], false);
    }
    $display .= FF_siteFooter();
开发者ID:spacequad,项目名称:glfusion,代码行数:31,代码来源:index.php

示例10: COM_applyFilter

            break;
        case 'delete':
            // delete the element
            $id = COM_applyFilter($_GET['mid'], true);
            $menu_id = COM_applyFilter($_GET['menuid'], true);
            $menu = menu::getInstance($menu_id);
            MB_deleteChildElements($id, $menu_id);
            $menu->reorderMenu(0);
            echo COM_refresh($_CONF['site_admin_url'] . '/menu.php?mode=menu&amp;menu=' . $menu_id);
            exit;
            break;
        case 'deletemenu':
            // delete the element
            $menu_id = COM_applyFilter($_GET['id'], true);
            MB_deleteMenu($menu_id);
            echo COM_refresh($_CONF['site_admin_url'] . '/menu.php');
            exit;
            break;
        case 'newmenu':
            $content = MB_createMenu();
            $currentSelect = $LANG_MB01['menu_builder'];
            break;
        default:
            $content = MB_displayMenuList();
            break;
    }
} else {
    if (isset($_POST['cancel']) && isset($_POST['menu'])) {
        $menu_id = COM_applyFilter($_POST['menu'], true);
        $content = MB_displayTree($menu_id);
    } else {
开发者ID:spacequad,项目名称:glfusion,代码行数:31,代码来源:menu.php

示例11: time

        $sort_user = $_USER['uid'];
    }
    $sort_datetime = time();
    $referer = DB_escapeString($referer);
    $keywords = DB_escapeString($keywords);
    $sql = "INSERT INTO {$_TABLES['mg_sort']} (sort_id,sort_user,sort_query,sort_results,sort_datetime,referer,keywords)\n            VALUES ('{$sort_id}',{$sort_user},'{$sqltmp}',{$numresults},{$sort_datetime},'{$referer}','{$keywords}')";
    $result = DB_query($sql);
    if (DB_error()) {
        COM_errorLog("Media Gallery: Error placing sort query into database");
    }
    $sort_purge = time() - 3660;
    // 43200;
    DB_query("DELETE FROM {$_TABLES['mg_sort']} WHERE sort_datetime < " . $sort_purge);
    $pageBody .= MG_search($sort_id, 1);
} elseif ($mode == $LANG_MG01['cancel']) {
    echo COM_refresh($_MG_CONF['site_url'] . '/index.php');
    exit;
} elseif (isset($_GET['id'])) {
    $id = COM_applyFilter($_GET['id']);
    $page = COM_applyFilter($_GET['page'], true);
    if ($page < 1) {
        $page = 1;
    }
    $pageBody .= MG_search($id, $page);
} else {
    $pageBody .= MG_displaySearchBox('');
}
$display = MG_siteHeader($LANG_MG00['results']);
$display .= $pageBody;
$display .= MG_siteFooter();
echo $display;
开发者ID:spacequad,项目名称:glfusion,代码行数:31,代码来源:search.php

示例12: mailstoryform

/**
* Display form to email a story to someone.
*
* @param    string  $sid    ID of article to email
* @return   string          HTML for email story form
*
*/
function mailstoryform($sid, $to = '', $toemail = '', $from = '', $fromemail = '', $shortmsg = '', $msg = 0)
{
    global $_CONF, $_TABLES, $_USER, $LANG08, $LANG_LOGIN;
    require_once $_CONF['path_system'] . 'lib-story.php';
    $retval = '';
    if (COM_isAnonUser() && ($_CONF['loginrequired'] == 1 || $_CONF['emailstoryloginrequired'] == 1)) {
        $retval = COM_startBlock($LANG_LOGIN[1], '', COM_getBlockTemplate('_msg_block', 'header'));
        $login = new Template($_CONF['path_layout'] . 'submit');
        $login->set_file(array('login' => 'submitloginrequired.thtml'));
        $login->set_var('xhtml', XHTML);
        $login->set_var('site_url', $_CONF['site_url']);
        $login->set_var('site_admin_url', $_CONF['site_admin_url']);
        $login->set_var('layout_url', $_CONF['layout_url']);
        $login->set_var('login_message', $LANG_LOGIN[2]);
        $login->set_var('lang_login', $LANG_LOGIN[3]);
        $login->set_var('lang_newuser', $LANG_LOGIN[4]);
        $login->parse('output', 'login');
        $retval .= $login->finish($login->get_var('output'));
        $retval .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
        return $retval;
    }
    $story = new Story();
    $result = $story->loadFromDatabase($sid, 'view');
    if ($result != STORY_LOADED_OK) {
        return COM_refresh($_CONF['site_url'] . '/index.php');
    }
    if ($msg > 0) {
        $retval .= COM_showMessage($msg);
    }
    if (empty($from) && empty($fromemail)) {
        if (!COM_isAnonUser()) {
            $from = COM_getDisplayName($_USER['uid'], $_USER['username'], $_USER['fullname']);
            $fromemail = DB_getItem($_TABLES['users'], 'email', "uid = {$_USER['uid']}");
        }
    }
    $mail_template = new Template($_CONF['path_layout'] . 'profiles');
    $mail_template->set_file('form', 'contactauthorform.thtml');
    $mail_template->set_var('xhtml', XHTML);
    $mail_template->set_var('site_url', $_CONF['site_url']);
    $mail_template->set_var('site_admin_url', $_CONF['site_admin_url']);
    $mail_template->set_var('layout_url', $_CONF['layout_url']);
    $mail_template->set_var('start_block_mailstory2friend', COM_startBlock($LANG08[17]));
    $mail_template->set_var('lang_title', $LANG08[31]);
    $mail_template->set_var('story_title', $story->displayElements('title'));
    $url = COM_buildUrl($_CONF['site_url'] . '/article.php?story=' . $sid);
    $mail_template->set_var('story_url', $url);
    $link = COM_createLink($story->displayElements('title'), $url);
    $mail_template->set_var('story_link', $link);
    $mail_template->set_var('lang_fromname', $LANG08[20]);
    $mail_template->set_var('name', $from);
    $mail_template->set_var('lang_fromemailaddress', $LANG08[21]);
    $mail_template->set_var('email', $fromemail);
    $mail_template->set_var('lang_toname', $LANG08[18]);
    $mail_template->set_var('toname', $to);
    $mail_template->set_var('lang_toemailaddress', $LANG08[19]);
    $mail_template->set_var('toemail', $toemail);
    $mail_template->set_var('lang_cc', $LANG08[36]);
    $mail_template->set_var('lang_cc_description', $LANG08[37]);
    $mail_template->set_var('lang_shortmessage', $LANG08[27]);
    $mail_template->set_var('shortmsg', htmlspecialchars($shortmsg));
    $mail_template->set_var('lang_warning', $LANG08[22]);
    $mail_template->set_var('lang_sendmessage', $LANG08[16]);
    $mail_template->set_var('story_id', $sid);
    $mail_template->set_var('end_block', COM_endBlock());
    PLG_templateSetVars('emailstory', $mail_template);
    $mail_template->parse('output', 'form');
    $retval .= $mail_template->finish($mail_template->get_var('output'));
    return $retval;
}
开发者ID:hostellerie,项目名称:nexpro,代码行数:76,代码来源:profiles.php

示例13: DB_query

                DB_query("UPDATE {$_TABLES['nf_templatedata']} set logicalID='{$id}',firstTask=0 WHERE id='{$A['id']}'");
                $id++;
            }
        }
        // Set the firstTask Flag for just the first logical id
        // Reset all to 0 and then set the flag to 1 for the first logical task
        DB_query("UPDATE {$_TABLES['nf_templatedata']} set firstTask=0 WHERE nf_templateID='{$templateID}'");
        $sql = "SELECT id FROM {$_TABLES['nf_templatedata']} WHERE nf_templateID='{$templateID}' ORDER BY logicalID  Limit 1";
        list($first_taskID) = DB_fetchArray(DB_query($sql));
        DB_query("UPDATE {$_TABLES['nf_templatedata']} set firstTask=1 WHERE id='{$first_taskID}'");
        break;
    case 'delete':
        DB_query("DELETE FROM {$_TABLES['nf_templatedatanextstep']} WHERE nf_templateDataFrom = '{$taskID}'");
        DB_query("DELETE FROM {$_TABLES['nf_templateassignment']} WHERE nf_templateDataID='{$taskID}'");
        DB_query("DELETE FROM {$_TABLES['nf_templatedata']} WHERE id='{$taskID}'");
        echo COM_refresh("index.php?templateID=" . $templateID);
        break;
}
if ($templateID > 0) {
    $actionurl = $_CONF['site_admin_url'] . '/plugins/nexflow/index.php';
    $imgset = "{$_CONF['layout_url']}/nexflow/images";
    $reminder_image = '<span style="padding-left:5px;"><img src ="' . $imgset . '/admin/reminder.gif" TITLE="Task Reminder Enabled"></span>';
    $notify1_image = '<span style="padding-left:5px;"><img src ="' . $imgset . '/admin/notify.gif" TITLE="Task Assignment Notification Enabled"></span>';
    $notify2_image = '<span style="padding-left:5px;"><img src ="' . $imgset . '/admin/postnotify.gif" TITLE="Task Completion Notification Enabled"></span>';
    $p = new Template($_CONF['path_layout'] . 'nexflow/admin');
    $p->set_file(array('page' => 'template_tasks.thtml', 'records' => 'template_task_record.thtml'));
    $p->set_var('action_url', $actionurl);
    $p->set_var('public_url', $_CONF['site_admin_url'] . '/plugins/nexflow');
    $p->set_var('template_id', $templateID);
    $p->set_var('edit_task_id', $taskID);
    $p->set_var('show_taskoptions', 'none');
开发者ID:hostellerie,项目名称:nexpro,代码行数:31,代码来源:index.php

示例14: alertMessage

     $promptform = '<p><FORM ACTION="' . $_CONF['site_url'] . '/forum/moderation.php" METHOD="POST">';
     $promptform .= '<INPUT TYPE="hidden" NAME="modconfirmdelete" VALUE="1">';
     $promptform .= '<INPUT TYPE="hidden" NAME="msgid"  VALUE="' . $fortopicid . '">';
     $promptform .= '<INPUT TYPE="hidden" NAME="forum"  VALUE="' . $forum . '">';
     $promptform .= '<INPUT TYPE="hidden" NAME="msgpid" VALUE="' . $msgpid . '">';
     $promptform .= '<INPUT TYPE="hidden" NAME="top" VALUE="' . $top . '">';
     $promptform .= '<CENTER><INPUT TYPE="submit" NAME="submit" VALUE="' . $LANG_GF01['CONFIRM'] . '">&nbsp;&nbsp;';
     $promptform .= '<INPUT TYPE="submit" NAME="submit" VALUE="' . $LANG_GF01['CANCEL'] . '"></CENTER>';
     $promptform .= '</CENTER></FORM></p>';
     alertMessage($alertmessage, $LANG_GF02['msg182'], $promptform);
 } elseif ($modfunction == 'editpost' and forum_modPermission($forum, $_USER['uid'], 'mod_edit') and $fortopicid != 0) {
     $page = COM_applyFilter($_REQUEST['page'], true);
     echo COM_refresh("createtopic.php?method=edit&id={$fortopicid}&page={$page}");
     echo $LANG_GF02['msg110'];
 } elseif ($modfunction == 'lockedpost' and forum_modPermission($forum, $_USER['uid'], 'mod_edit') and $fortopicid != 0) {
     echo COM_refresh("createtopic.php?method=postreply&id={$fortopicid}");
     echo $LANG_GF02['msg173'];
 } elseif ($modfunction == 'movetopic' and forum_modPermission($forum, $_USER['uid'], 'mod_move') and $fortopicid != 0) {
     $SECgroups = SEC_getUserGroups();
     // Returns an Associative Array - need to parse out the group id's
     $modgroups = '';
     foreach ($SECgroups as $key) {
         if ($modgroups == '') {
             $modgroups = $key;
         } else {
             $modgroups .= ",{$key}";
         }
     }
     /* Check and see if user had moderation rights to another forum to complete the topic move */
     $sql = "SELECT DISTINCT forum_name FROM {$_TABLES['gf_moderators']} a , {$_TABLES['gf_forums']} b ";
     $sql .= "where a.mod_forum = b.forum_id AND ( a.mod_uid='{$_USER['uid']}' OR a.mod_groupid in ({$modgroups}))";
开发者ID:hostellerie,项目名称:nexpro,代码行数:31,代码来源:moderation.php

示例15: deleteUser

/**
* Delete a user
*
* @param    int     $uid    id of user to delete
* @return   string          HTML redirect
*
*/
function deleteUser($uid)
{
    global $_CONF;
    if (!USER_deleteAccount($uid)) {
        return COM_refresh($_CONF['site_admin_url'] . '/user.php');
    }
    return COM_refresh($_CONF['site_admin_url'] . '/user.php?msg=22');
}
开发者ID:milk54,项目名称:geeklog-japan,代码行数:15,代码来源:user.php


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