FORUM WERKSTATT STORIES ARCHIV KLEINANZEIGEN
Avatar

PHP Profis hier ?

tino335i @, Freitag, 11. Januar 2019, 17:52 (vor 192 Tagen)

Bei den Kleinanzeigen geht seit gestern (Hochrüstung des Webservers auf PHP 7.2) eine Seite nicht mehr. Nämlich die zum aufgeben. Ich habe hier mal den Quelltext. Welcher Befehl ists der in 5.6. noch ging und nun in 7.2 nicht mehr ?


<?php

/**
* Insert new ad (user)
*
* @package ClassAd
* @author cts projects&software <classad@projects-and-software.de>
* @copyright cts projects&software 2002-2006
* @copyright All rights reserved
* @version 4.00
*
*/

require "inc/includer.inc.php";
require_once("inc/countries.inc.php");
require_once("inc/guielements.inc.php");
require "inc/badword.class.php";


// Try to extend the max. execution time
// Works only, if PHP-server is NOT configured for safe-mode
@set_time_limit(180);


// Check security options - allowed to post an ad directly?
function CheckSecurity() {

// Check, if direct submit is allowed
$DirectSubmit = 1;

// Allow direct submit?!
if($GLOBALS['SEC_DIR_SUB_UNKNOWN']==false && is_array($_SESSION['s_UserInfo'])==false) {
// Unknown user, no right to submit directly
$DirectSubmit = 0;
} elseif(isset($_SESSION['s_UserInfo']) && is_array($_SESSION['s_UserInfo'])) {
// Known user, check rights
if((($_SESSION['s_UserInfo']['userrights']& 1) && $GLOBALS['SEC_DIR_SUB_USER'])
|| (($_SESSION['s_UserInfo']['userrights']& 2) && $GLOBALS['SEC_DIR_SUB_AUTHUSER'])
|| (($_SESSION['s_UserInfo']['userrights']&16) && $GLOBALS['SEC_DIR_SUB_COMMERCIAL'])
|| (($_SESSION['s_UserInfo']['userrights']&64) || ($_SESSION['s_UserInfo']['userrights']&128)))
{
// Normal user, Auth user, Comm user (all with permission) or (Debug-)Admins
$DirectSubmit = 1;
}
} elseif(!is_array($_SESSION['s_UserInfo'])) {
$DirectSubmit = ($GLOBALS['SEC_DIR_SUB_UNKNOWN'] ? "1":"0");
}
return $DirectSubmit; // 0 -> not allowed, 1-> Allowed
}


// Add an ad to the database
function AddToDatabase($PicLink="") {

// Security
$strRequest = CheckSecurity();

// Add Advertisment to Database
$DB = new SQLDatabase();
$DB->dbconnect();

if($DB==false) {
echo LANG_DBCONNECTERRORCUST;
die();
}
$RetVal = $DB->dbinsert(BuildSQLString($PicLink,$strRequest));
if($RetVal) {
LogActions("MSGA","Msg-ID: ".$RetVal." - Titel: ".$_POST['f_title'].
" - IP: ".$_SERVER['REMOTE_ADDR'],$_SESSION['s_UserInfo']['userid']);

// Free Field to database
if($GLOBALS['USE_FREE_FIELDS']) {
if(($DB->dbinsert(BuildFFSQLString($RetVal))==false) && ($GLOBALS['DEBUG'])) {
ShowErrorMessage("Problems inserting free field data!");
}
}
// Do the request work
if($strRequest!="1") {
SendAdCheckRequest($RetVal,false);
}
elseif($GLOBALS['SEC_SUB_ADMIN_INFO']) {
SendAdCheckRequest($RetVal,true);
}
}
return $RetVal;
}

// Build SQL String to insert FreeField data
function BuildFFSQLString($iAdId=0) {

if($iAdId <=0) { return false; }

$sql = "INSERT INTO cf_adfreerows ".
"(adid, freecol01,freecol02,freecol03,freecol04,freecol05,".
"freecol06,freecol07,freecol08,freecol09,freecol10,freecoldesc)

mehr geht leider hier nicht in einem Beitrag zu schreiben. Bei Bedarf schicke ich gerne die Datei rum.

mfg tino


gesamter Thread:

 

powered by my little forum