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


PHP viscacha_header函数代码示例

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


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

示例1: init

 function init($dir = null)
 {
     if ($dir != null) {
         $this->setdir($dir);
     }
     $this->group('settings');
     $this->group('global');
     $this->group('modules');
     $this->group('custom');
     @ini_set('default_charset', '');
     if (!headers_sent()) {
         viscacha_header('Content-type: text/html; charset=' . $this->phrase('charset'));
     }
     global $slog;
     if (isset($slog) && is_object($slog) && method_exists($slog, 'setlang')) {
         $slog->setlang($this->phrase('fallback_no_username'), $this->phrase('timezone_summer'));
     }
     global $config, $breadcrumb;
     if (isset($breadcrumb)) {
         $isforum = array('addreply', 'attachments', 'edit', 'forum', 'manageforum', 'managetopic', 'misc', 'newtopic', 'pdf', 'search', 'showforum', 'showtopic');
         if ($config['indexpage'] != 'forum' && in_array(SCRIPTNAME, $isforum)) {
             $breadcrumb->Add($this->phrase('forumname'), iif(SCRIPTNAME != 'forum', 'forum.php'));
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:25,代码来源:class.language.php

示例2: Out

 function Out($skip = 1)
 {
     global $breadcrumb, $config, $mymodules;
     $this->sid = SID2URL;
     $Contents = ob_get_contents();
     ob_end_clean();
     $Contents = $this->AddSid($Contents);
     if (isset($mymodules)) {
         extract($mymodules->load('docout_parse', get_defined_vars()), EXTR_SKIP);
     }
     if ($this->enc != FALSE && $skip == 1 && $this->cfg == 1) {
         viscacha_header("Content-Encoding: " . $this->enc);
         print "‹";
         $Size = strlen($Contents);
         $Crc = crc32($Contents);
         $Contents = gzcompress($Contents, $this->level);
         $Contents = substr($Contents, 0, strlen($Contents) - 4);
         print $Contents;
         print pack('V', $Crc);
         print pack('V', $Size);
         exit;
     } else {
         print $Contents;
         exit;
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:26,代码来源:class.docoutput.php

示例3: get_image

 function get_image()
 {
     $mime = get_mimetype($this->path);
     viscacha_header('Content-Type: ' . $mime['mime']);
     readfile($this->path);
     exit;
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:7,代码来源:class.thumbnail.php

示例4: initAdmin

 function initAdmin($dir = null)
 {
     if ($dir != null) {
         $this->setdir($dir);
     }
     $this->group('settings');
     $this->group('admin/global');
     $this->group('modules');
     $this->group('custom');
     @ini_set('default_charset', '');
     if (!headers_sent()) {
         viscacha_header('Content-type: text/html; charset=' . $this->phrase('charset'));
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:14,代码来源:class.language.php

示例5: initAdmin

 function initAdmin($dir = null)
 {
     global $admconfig, $my;
     if (!empty($my->settings['default_language'])) {
         $dir = $my->settings['default_language'];
     } elseif (is_id($admconfig['default_language'])) {
         $dir = $admconfig['default_language'];
     }
     if ($dir != null) {
         $this->setdir($dir);
     }
     $this->group('settings');
     $this->group('admin/global');
     $this->group('modules');
     $this->group('custom');
     @ini_set('default_charset', '');
     if (!headers_sent()) {
         viscacha_header('Content-type: text/html; charset=' . $this->charset());
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:20,代码来源:class.language.php

示例6: Out

 function Out($skip = 1)
 {
     global $breadcrumb, $config, $plugins;
     $this->sid = SID2URL;
     $Contents = ob_get_contents();
     ob_end_clean();
     $Contents = $this->AddSid($Contents);
     ($code = $plugins->load('docout_parse')) ? eval($code) : null;
     if ($this->enc != FALSE && $skip == 1 && $this->cfg == 1) {
         viscacha_header("Content-Encoding: " . $this->enc);
         print "‹";
         $Size = strlen($Contents);
         $Crc = crc32($Contents);
         $Contents = gzcompress($Contents, $this->level);
         $Contents = substr($Contents, 0, strlen($Contents) - 4);
         print $Contents;
         print pack('V', $Crc);
         print pack('V', $Size);
     } else {
         print $Contents;
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:22,代码来源:class.docoutput.php

示例7: error_reporting

	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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
error_reporting(E_ALL);
define('SCRIPTNAME', 'ajax');
define('VISCACHA_CORE', '1');
define('TEMPSHOWLOG', 1);
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$my->p = $slog->Permissions();
$action = $gpc->get('action', str);
viscacha_header("Content-type: text/plain");
send_nocache_header();
($code = $plugins->load('ajax_start')) ? eval($code) : null;
// Schliesst oder oeffnet einen Beitrag mittels AJAX
if ($action == 'openclosethread') {
    $result = $db->query("SELECT status, board FROM {$db->pre}topics WHERE id = '{$_GET['id']}'", __LINE__, __FILE__);
    $row = $db->fetch_assoc($result);
    $my->p = $slog->Permissions($row['board']);
    $my->mp = $slog->ModPermissions($row['board']);
    $request = 1;
    if ($my->p['admin'] == 1 || $my->p['gmod'] == 1 || $my->mp[0] == 1) {
        if ($row['status'] == 0) {
            $db->query("UPDATE {$db->pre}topics SET status = '1' WHERE id = '{$_GET['id']}'", __LINE__, __FILE__);
            if ($db->affected_rows() == 1) {
                $request = 3;
            }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:ajax.php

示例8: elseif

     include 'admin/designs.php';
 } elseif ($action == 'packages') {
     include 'admin/packages.php';
 } elseif ($action == 'profilefield') {
     include 'admin/profilefield.php';
 } elseif ($action == 'posts') {
     include 'admin/posts.php';
 } elseif ($action == 'logout') {
     $slog->sid_logout();
     echo head();
     ok('admin.php', $lang->phrase('admin_successfully_logged_off'));
 } elseif ($action == 'locate') {
     $url = $gpc->get('url', none);
     if (!empty($url)) {
         $db->close();
         viscacha_header('Location: ' . $url);
         exit;
     } else {
         echo head();
         if (!empty($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'action=locate') === false) {
             $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
         } else {
             $url = 'javascript:history.back(-1);';
         }
         error($url, $lang->phrase('admin_choose_valid_location_option'));
     }
 } else {
     if (strlen($action) == 0) {
         include 'admin/frames.php';
     } else {
         $error = true;
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:admin.php

示例9: viscacha_header

    }
    $db->query('UPDATE ' . $db->pre . 'menu SET active = "' . $pos . '" WHERE id = ' . $id);
    $plug = $gpc->get('plug', int);
    if ($plug > 0) {
        $result = $db->query("SELECT position FROM {$db->pre}plugins WHERE id = '{$plug}'");
        if ($db->num_rows($result) > 0) {
            $module_sql = ", module = '{$plug}'";
            $row = $db->fetch_assoc($result);
            $filesystem->unlink('cache/modules/' . $plugins->_group($row['position']) . '.php');
            // Do not do that anymore, because it may be required
            // $db->query("UPDATE {$db->pre}plugins SET active = '{$pos}' WHERE id = '{$plug}' LIMIT 1");
        }
    }
    $delobj = $scache->load('modules_navigation');
    $delobj->delete();
    viscacha_header('Location: admin.php?action=cms&job=nav');
} elseif ($job == 'nav_addplugin') {
    echo head();
    $id = $gpc->get('id', int);
    $sort = $db->query("SELECT id, name, position FROM {$db->pre}menu WHERE sub = '0' ORDER BY position, ordering, id");
    $plugs = $db->query("SELECT id, name FROM {$db->pre}plugins WHERE position = 'navigation' ORDER BY ordering");
    $groups = $db->query("SELECT id, name FROM {$db->pre}groups");
    $pos = parseNavPosSetting();
    ?>
<form name="form" method="post" action="admin.php?action=cms&amp;job=nav_addplugin2">
 <table class="border" border="0" cellspacing="0" cellpadding="4" align="center">
  <tr>
   <td class="obox" colspan="2"><?php 
    echo $lang->phrase('admin_cms_nav_add_plugin');
    ?>
</td>
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:cms.php

示例10: foot

    echo foot();
} elseif ($job == "captcha_noises_delete") {
    echo head();
    $delete = $gpc->get('delete', arr_str);
    $deleted = 0;
    foreach ($delete as $filename) {
        $filesystem->unlink('classes/graphic/noises/' . $filename . '.jpg');
        if (!file_exists('classes/graphic/noises/' . $filename . '.jpg')) {
            $deleted++;
        }
    }
    ok('admin.php?action=misc&job=captcha_noises', $deleted . ' Background pictures have been deleted.');
} elseif ($job == "captcha_noises_view") {
    $file = $gpc->get('file', str);
    viscacha_header('Content-Type: image/jpeg');
    viscacha_header('Content-Disposition: inline; filename="' . $file . '.jpg"');
    readfile('classes/graphic/noises/' . $file . '.jpg');
} elseif ($job == "captcha_noises") {
    $fonts = array();
    $dir = 'classes/graphic/noises/';
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false) {
            if (get_extension($file) == 'jpg') {
                $fonts[] = $dir . $file;
            }
        }
        closedir($dh);
    }
    echo head();
    ?>
<form action="admin.php?action=misc&job=captcha_noises_delete" name="form2" method="post">
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:misc.php

示例11: error

             error($inserterrors, 'attachments.php?type=' . $_GET['type'] . '&amp;id=' . $_GET['id'] . SID2URL_x);
         }
         if ($_GET['type'] == 'edit' && ($my->mp[0] == 1 || $upinfo['name'] == $my->id)) {
             $upper = $upinfo['name'];
             $tid = $upinfo['id'];
         } else {
             $upper = $my->id;
             $tid = 0;
         }
         if (count($insertuploads) > 0 && count($insertuploads) <= $config['tpcmaxuploads']) {
             foreach ($insertuploads as $up) {
                 $up = trim($up);
                 $db->query("INSERT INTO {$db->pre}uploads (file,tid,mid,topic_id) VALUES ('{$up}','{$tid}','{$upper}','{$upinfo['topic_id']}')", __LINE__, __FILE__);
             }
         }
         viscacha_header('Location: attachments.php?type=' . $_GET['type'] . '&id=' . $_GET['id'] . SID2URL_JS_x);
     }
 } else {
     echo $tpl->parse("popup/header");
     $filetypes = implode($lang->phrase('listspacer'), explode('|', $config['tpcfiletypes']));
     $filesize = formatFilesize($config['tpcfilesize']);
     if ($_GET['type'] == 'edit' && ($my->mp[0] == 1 || $upinfo['name'] == $my->id)) {
         $result = $db->query('SELECT id, file FROM ' . $db->pre . 'uploads WHERE mid = "' . $upinfo['name'] . '" AND tid = "' . $upinfo['id'] . '"', __LINE__, __FILE__);
     } else {
         $result = $db->query('SELECT id, file FROM ' . $db->pre . 'uploads WHERE mid = "' . $my->id . '" AND topic_id = "' . $upinfo['id'] . '" AND tid = "0"', __LINE__, __FILE__);
     }
     $free = $config['tpcmaxuploads'] - $db->num_rows($result);
     if ($free < 1) {
         $free = 0;
     }
     $uploads = array();
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:attachments.php

示例12: elseif

} elseif ($job == 'cat_move' || $job == 'forum_move') {
    $id = $gpc->get('id', int);
    $move = $gpc->get('move', int);
    if (!is_id($id)) {
        echo head();
        error('admin.php?action=forums&job=manage', 'Forum or Category was not found on account of an invalid ID.');
    }
    $table = iif($job == 'cat_move', "{$db->pre}categories", "{$db->pre}forums");
    $cache = iif($job == 'cat_move', "categories", "cat_bid");
    $op = iif($move == 1, "+", "-");
    $db->query("UPDATE {$table} SET position = position{$op}1 WHERE id = '{$id}' LIMIT 1", __LINE__, __FILE__);
    $delobj = $scache->load('forumtree');
    $delobj->delete();
    $delobj = $scache->load($cache);
    $delobj->delete();
    viscacha_header('Location: admin.php?action=forums&job=manage');
} elseif ($job == 'rights') {
    echo head();
    $id = $gpc->get('id', int);
    if ($id == 0) {
        error('admin.pgp?action=forums&job=manage', 'Forum not found');
    }
    $result = $db->query("SELECT f.*, g.name, g.title, g.guest, g.core FROM {$db->pre}fgroups AS f LEFT JOIN {$db->pre}groups AS g ON g.id = f.gid WHERE f.bid = '{$id}' ORDER BY f.gid", __LINE__, __FILE__);
    $cache = array();
    $colspan = count($glk_forums) + 2;
    ?>
<form name="form" method="post" action="admin.php?action=forums&job=rights_delete&id=<?php 
    echo $id;
    ?>
">
 <table class="border">
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:forums.php

示例13: foot

    }
    ?>
  <tr>
   <td class="ubox" colspan="2" align="center"><input type="submit" name="Submit" value="<?php 
    echo $lang->phrase('admin_lang_form_save');
    ?>
" /></td>
  </tr>
 </table>
</form>
	<?php 
    echo foot();
} elseif ($job == 'phrase_add2') {
    echo head();
    $varname = $gpc->get('varname', none);
    $text = $gpc->get('text', none);
    $file = base64_decode($gpc->get('file', none));
    $language = $gpc->get('langt', none);
    $c = new manageconfig();
    foreach ($language as $id => $t) {
        if (empty($t)) {
            $t = $text;
        }
        $c->getdata("language/{$id}/{$file}", 'lang');
        $c->updateconfig($varname, str, $t);
        $c->savedata();
    }
    ok('admin.php?action=language&job=phrase_file&file=' . urlencode(base64_encode($file)));
} else {
    viscacha_header('Location: admin.php?action=language&job=manage');
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:language.php

示例14: error

        error('admin.php?action=groups&job=add', 'Die Gruppe konnte nicht eingefügt werden!');
    }
} elseif ($job == 'delete') {
    $del = $gpc->get('delete', arr_int);
    $edit = $gpc->get('edit', int);
    if (isset($_POST['submit_delete']) && count($del) > 0) {
        $db->query("DELETE FROM {$db->pre}groups WHERE id IN (" . implode(',', $del) . ")");
        $anz = $db->affected_rows();
        $scache = new scache('group_status');
        $scache->deletedata();
        echo head();
        ok('admin.php?action=groups&job=manage', $anz . ' Einträge gelöscht');
    } elseif (isset($_POST['submit_edit']) && $edit > 0) {
        viscacha_header('Location: admin.php?action=groups&job=edit&id=' . $edit);
    } else {
        viscacha_header('Location: admin.php?action=groups&job=manage');
    }
} elseif ($job == 'edit') {
    $id = $gpc->get('id', int);
    echo head();
    $result = $db->query("SELECT * FROM {$db->pre}groups WHERE id = '{$id}' LIMIT 1", __LINE__, __FILE__);
    if ($db->num_rows($result) != 1) {
        error('admin.php?action=groups&job=manage', 'Keine gültige ID angegeben');
    }
    $data = $db->fetch_assoc($result);
    ?>
<form name="form" method="post" action="admin.php?action=groups&amp;job=edit2&amp;id=<?php 
    echo $id;
    ?>
">
 <table class="border">
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:groups.php

示例15: _redirect

 /**
  * @since 1.4
  * @access private
  */
 function _redirect($filename, $op = true)
 {
     if ($op) {
         $a = 'inline';
     } else {
         $a = 'attachment';
     }
     viscacha_header("Content-Type: " . $this->contentType . "; charset=" . $this->encoding);
     viscacha_header("Content-Disposition: " . $a . "; filename=" . basename($filename));
     readfile($filename, "r");
     die;
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:16,代码来源:class.feedcreator.php


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