/**
  * show error message and close button
  */
 function show_no_permission_error_page()
 {
     xoops_header();
     echo _MD_XOONIPS_ITEM_FORBIDDEN . '<br /><input type="button"' . ' onclick="javascript:window.close();" value="' . _CLOSE . '" />';
     xoops_footer();
     exit;
 }
 function render()
 {
     global $xoopsConfig;
     require_once XOOPS_ROOT_PATH . '/class/template.php';
     $xoopsTpl = new XoopsTpl();
     xoops_header(false);
     $xoopsTpl->assign('template_file_name', 'db:' . $this->_params['template_file_name']);
     $xoopsTpl->assign('template_vars', $this->_params['template_vars']);
     $xoopsTpl->display('db:xoonips_transfer_user_requested_item_detail.html');
     xoops_footer();
 }
 function &start()
 {
     global $xoopsConfig, $xoopsOption, $xoopsModule, $xoopsTpl, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger;
     if (!empty($this->mTemplate)) {
         $GLOBALS['xoopsOption']['template_main'] = $this->mTemplate;
     }
     if (!$this->mAction->mDialogMode) {
         include XOOPS_ROOT_PATH . '/header.php';
     } else {
         if (class_exists('XCube_Root')) {
             $root =& XCube_Root::getSingleton();
             $root->mController->setDialogMode(true);
             include XOOPS_ROOT_PATH . '/header.php';
         } else {
             xoops_header(false);
             require_once XOOPS_ROOT_PATH . '/class/template.php';
             $GLOBALS['xoopsTpl'] = new XoopsTpl();
         }
     }
     $this->mXoopsTpl =& $GLOBALS['xoopsTpl'];
     $this->_addSmartyPugin();
     return $this->mXoopsTpl;
 }
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         kernel
 * @since           2.3.0
 * @author          Taiwen Jiang <*****@*****.**>
 * @version         $Id$
 */
include_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'mainfile.php';
xoops_header(false);
$denied = true;
if (!empty($_REQUEST['token'])) {
    if ($GLOBALS['xoopsSecurity']->validateToken($_REQUEST['token'], false)) {
        $denied = false;
    }
} else {
    if (is_object($xoopsUser) && $xoopsUser->isAdmin()) {
        $denied = false;
    }
}
if ($denied) {
    xoops_error(_NOPERM);
    exit;
}
$token = isset($_REQUEST['token']) ? $_REQUEST['token'] : '';
Exemple #5
0
$to_userid = !empty($_GET['to_userid']) ? (int) $_GET['to_userid'] : 0;
$msg_id = !empty($_GET['msg_id']) ? (int) $_GET['msg_id'] : 0;
if (empty($_GET['refresh']) && isset($_POST['op']) && $_POST['op'] != "submit") {
    $jump = "pmlite.php?refresh=" . time() . "";
    if ($send == 1) {
        $jump .= "&amp;send=" . $send . "";
    } elseif ($send2 == 1) {
        $jump .= "&amp;send2=" . $send2 . "&amp;to_userid=" . $to_userid . "";
    } elseif ($reply == 1) {
        $jump .= "&amp;reply=" . $reply . "&amp;msg_id=" . $msg_id . "";
    } else {
    }
    echo "<html><head><meta http-equiv='Refresh' content='0; url=" . $jump . "' /></head><body></body></html>";
    exit;
}
xoops_header();
if (icms::$user) {
    if (isset($_POST['op']) && $_POST['op'] == "submit") {
        if (!icms::$security->check()) {
            $security_error = true;
        }
        $res = icms::$xoopsDB->query("SELECT COUNT(*) FROM " . icms::$xoopsDB->prefix("users") . " WHERE uid='" . (int) $_POST['to_userid'] . "'");
        list($count) = icms::$xoopsDB->fetchRow($res);
        if ($count != 1) {
            echo "<br /><br /><div><h4>" . _PM_USERNOEXIST . "<br />";
            echo _PM_PLZTRYAGAIN . "</h4><br />";
            if (isset($security_error) && $security_error == true) {
                echo implode('<br />', icms::$security->getErrors());
            }
            echo "[ <a href='javascript:history.go(-1)'>" . _PM_GOBACK . "</a> ]</div>";
        } else {
Exemple #6
0
    case 'attachment':
        $file_id = isset($_GET['file_id']) ? intval($_GET['file_id']) : 0;
        if ($file_id == 0) {
            exit(_MYSHOP_ERROR13);
        }
        $attachedFile = null;
        $attachedFile = $h_myshop_files->get($file_id);
        if (!is_object($attachedFile)) {
            exit(_MYSHOP_ERROR19);
        }
        header("Content-Type: " . $attachedFile->getVar('file_mimetype'));
        header('Content-disposition: inline; filename="' . $attachedFile->getVar('file_filename') . '"');
        readfile($attachedFile->getPath());
        break;
    case 'picture':
        xoops_header(true);
        echo "<div align='center' style='font-weight: bold;'><a href=\"javascript:self.close();\" title=\"" . _CLOSE . "\">";
        if ($product->pictureExists()) {
            echo "<img src='" . $product->getPictureUrl() . "' alt='' />";
        } else {
            echo _MYSHOP_SORRY_NOPICTURE;
        }
        ?>
		</a></div><br />
		<br />
		<div align='center'><input value="<?php 
        echo _CLOSE;
        ?>
" type="button" onclick="javascript:window.close();" /></div>
<?php 
        xoops_footer();