MyXoops Forum

Forum - myXOOPS German Support

0 + 5 = ?  
Geben Sie das Ergebnis der Berechnung ein
Sie haben max. 10 Versuche.
 
* = Erforderlich

Re: Serverumstellung: von php 4..3.9 auf 4.4.1 - gd lib? - bildupload geht nicht

Betreff: Re: Serverumstellung: von php 4..3.9 auf 4.4.1 - gd lib? - bildupload geht nicht
von Surprize am 14.11.2005 15:25:03

da steht nchts in der ini (von silly safe mode ?!?!) , nutze xcgal 2.0 für xoops 2.2.3
?!?!?

das steht bei mir?

<?php
// $Id: init.inc.php,v 1.0 2003/11/7 17:53:00 derya Exp $

if (file_exists("../../mainfile.php")) include_once "../../mainfile.php";
else include_once "../../../mainfile.php";
include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php";
if ( !defined('IN_XCGALLERY') ) redirect_header(XOOPS_URL."/", 3, _NOPERM);
//define('SILLY_SAFE_MODE',1);

// used for timing purpose
$query_stats = array();

function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();

// Do some cleanup in GET, POST and cookie data and un-register global vars

if (is_array($HTTP_POST_VARS)) {
foreach ($HTTP_POST_VARS as $key => $value){
if (!is_array($value))
$HTTP_POST_VARS[$key] = $value;
if (isset($$key)) unset($$key);
}
}

if (is_array($HTTP_GET_VARS)) {
foreach ($HTTP_GET_VARS as $key => $value){
$HTTP_GET_VARS[$key] = $value;
if (isset($$key)) unset($$key);
}
}

if (is_array($HTTP_COOKIE_VARS)) {
foreach ($HTTP_COOKIE_VARS as $key => $value){
if (isset($$key)) unset($$key);
}
}


// Initialise the $CONFIG array and some other variables
$CONFIG=array();
$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
$REFERER = urlencode( $PHP_SELF . (isset($HTTP_SERVER_VARS['QUERY_STRING']) && $HTTP_SERVER_VARS['QUERY_STRING'] ? '?'.$HTTP_SERVER_VARS['QUERY_STRING'] : ''));
$ALBUM_SET ='';
$FORBIDDEN_SET ='';
$CURRENT_CAT_NAME ='';

// Define some constants
define('USER_GAL_CAT', 1);
define('FIRST_USER_CAT', 10000);
define('RANDPOS_MAX_PIC', 200);
define('RANDPOS_INTERVAL',5);
//define('TEMPLATE_FILE', 'template.html');

$IMG_TYPES = array(
1 => 'GIF',
2 => 'JPG',
3 => 'PNG',
4 => 'SWF',
5 => 'PSD',
6 => 'BMP',
7 => 'TIFF',
8 => 'TIFF',
9 => 'JPC',
10 => 'JP2',
11 => 'JPX',
12 => 'JB2',
13 => 'SWC',
14 => 'IFF'
);

// Include config and functions files
require XOOPS_ROOT_PATH."/modules/xcgal/include/functions.inc.php";

// Parse cookie stored user profile
user_get_profile();

// Authenticate
if (is_object($xoopsUser)) {
$cookie_uid = $xoopsUser->getVar('uid');
//$cookie_pass = substr(addslashes($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_pass']), 0, 32);


} else {
$cookie_uid = 0;
$cookie_pass = '*';
}
if (is_object($xoopsUser)){
$usergroups = $xoopsUser->getGroups();
$usergroup= implode(",",$usergroups);
$mygroup= $xoopsUser->getGroups();
$sql = "SELECT * FROM ".$xoopsDB->prefix("xcgal_usergroups")." WHERE xgroupid IN ({$usergroup})";
$results = $xoopsDB->query($sql);
$USER_DATA['can_send_ecards'] = 0;
$USER_DATA['can_rate_pictures'] = 0;
$USER_DATA['can_post_comments'] = 0;
$USER_DATA['can_upload_pictures'] = 0;
$USER_DATA['can_create_albums'] = 0;
$USER_DATA['pub_upl_need_approval'] = 1;
$USER_DATA['priv_upl_need_approval'] = 1;
$USER_DATA['group_quota'] = 0;
$USER_DATA['group_id'] = $usergroups;
while($ugroup=$xoopsDB->fetchArray($results)){
if ($ugroup['can_send_ecards'] == 1) $USER_DATA['can_send_ecards'] = $ugroup['can_send_ecards'];
if ($ugroup['can_rate_pictures'] == 1) $USER_DATA['can_rate_pictures'] = $ugroup['can_rate_pictures'];
if ($ugroup['can_post_comments'] == 1) $USER_DATA['can_post_comments'] = $ugroup['can_post_comments'];
if ($ugroup['can_upload_pictures'] == 1) $USER_DATA['can_upload_pictures'] = $ugroup['can_upload_pictures'];
if ($ugroup['can_create_albums'] == 1) $USER_DATA['can_create_albums'] = $ugroup['can_create_albums'];
if ($ugroup['pub_upl_need_approval'] == 0) $USER_DATA['pub_upl_need_approval'] = $ugroup['pub_upl_need_approval'];
if ($ugroup['priv_upl_need_approval'] == 0) $USER_DATA['pub_upl_need_approval'] = $ugroup['priv_upl_need_approval'];
if ($ugroup['group_quota'] > $USER_DATA['group_quota']) $USER_DATA['group_quota'] = $ugroup['group_quota'];
} // while
$xoopsModule = XoopsModule::getByDirname('xcgal');
if($xoopsUser->isAdmin($xoopsModule->mid())) define('USER_IS_ADMIN', 1);
else define('USER_IS_ADMIN', 0);
//$USER_DATA = $xoopsDB->fetchArray($results);
$USER_DATA['user_email']= $xoopsUser->email();
define('USER_ID', $xoopsUser->getVar('uid'));
define('USER_NAME', $xoopsUser->uname());
define('USER_CAN_SEND_ECARDS', (int)$USER_DATA['can_send_ecards']);
define('USER_CAN_RATE_PICTURES', (int)$USER_DATA['can_rate_pictures']);
define('USER_CAN_POST_COMMENTS', (int)$USER_DATA['can_post_comments']);
define('USER_CAN_UPLOAD_PICTURES', (int)$USER_DATA['can_upload_pictures']);
define('USER_CAN_CREATE_ALBUMS', (int)$USER_DATA['can_create_albums']);
$xoopsDB->freeRecordSet($results);
} else {
$results = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("xcgal_usergroups")." WHERE group_id = ".XOOPS_GROUP_ANONYMOUS."");
if (!($xoopsDB->getRowsNum($results))) die('<b>Coppermine critical error</b>:<br />The group table does not contain the Anonymous group !');
$USER_DATA = $xoopsDB->fetchArray($results);
define('USER_ID', 0);
define('USER_NAME', $xoopsConfig['anonymous']);
define('USER_IS_ADMIN', 0);
define('USER_CAN_SEND_ECARDS', (int)$USER_DATA['can_send_ecards']);
define('USER_CAN_RATE_PICTURES', (int)$USER_DATA['can_rate_pictures']);
define('USER_CAN_POST_COMMENTS', (int)$USER_DATA['can_post_comments']);
define('USER_CAN_UPLOAD_PICTURES', (int)$USER_DATA['can_upload_pictures']);
define('USER_CAN_CREATE_ALBUMS', 0);
$xoopsDB->freeRecordSet($results);
}

// Test if admin mode
$USER['am'] = isset($USER['am']) ? (int)$USER['am'] : 0;
define('GALLERY_ADMIN_MODE', USER_IS_ADMIN && $USER['am']);
define('USER_ADMIN_MODE', USER_ID && USER_CAN_CREATE_ALBUMS && $USER['am'] && !GALLERY_ADMIN_MODE);



?>

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag
Modulentwicklung New Xoops Xcreate Module 0 5310 26.11.2025 15:22
efkan Gehe zum letzten Beitrag
Modulentwicklung XOOPS Custom Field Module 1 1803 24.11.2025 11:21
Goffy Gehe zum letzten Beitrag