adjusted a lot of include files

main
hecht 7 years ago
parent 9a61d1eabc
commit 49292f2650

@ -8,7 +8,6 @@
include_once(ROOT_PATH.'/include/defines.inc.php'); include_once(ROOT_PATH.'/include/defines.inc.php');
include_once(ROOT_PATH.'/include/usergroup.inc.php'); include_once(ROOT_PATH.'/include/usergroup.inc.php');
include_once(ROOT_PATH.'/include/config/settings.inc.php');
include_once(ROOT_PATH.'/include/char.inc.php'); include_once(ROOT_PATH.'/include/char.inc.php');
include_once(ROOT_PATH.'/include/sqlwrapper.inc.php'); include_once(ROOT_PATH.'/include/sqlwrapper.inc.php');

@ -61,7 +61,7 @@ function insertIntoHallOfFameFull($round = '', $title = '', $charid = '', $charn
} }
$sql = 'INSERT INTO highscore('.$columns.') values('.$values.')'; $sql = 'INSERT INTO highscore('.$columns.') values('.$values.')';
// echo $sql.'<br>'; echo $sql.'<br>';
silent_query($sql); silent_query($sql);
return db_affected_rows() > 0; return db_affected_rows() > 0;
} }

@ -102,11 +102,19 @@ function itemEquals($lhs, $rhs) {
*/ */
function createItemForUser($item, $user_id, $amount = 1) { function createItemForUser($item, $user_id, $amount = 1) {
$ware_table=array('item' => 'ware', 'sp_item' => 'sp_ware', 'wochen_markt' => 'wochen_ware'); $ware_table=array('item' => 'ware', 'sp_item' => 'sp_ware', 'wochen_markt' => 'wochen_ware');
if ( $ware_table[$item['table_name']] == 'ware' ) {
$table = $ware_table[$item['table_name']];
if ($table === NULL) {
$table = $item['table_name'];
}
for ($i=0;$i<$amount;++$i) {
if ( $table == 'ware' ) {
$ru = $item['s_type']=='Trank'?' ':'1'; $ru = $item['s_type']=='Trank'?' ':'1';
db_query('INSERT ware(user,item_id,ru_mal) values('.$user_id.', '.$item['id'].', \''.$ru.'\')'); db_query('INSERT ware(user,item_id,ru_mal) values('.$user_id.', '.$item['id'].', \''.$ru.'\')');
} else { } else {
db_query('INSERT '.$ware_table[$item['table_name']].'(user, item) values('.$user_id.', '.$item['id'].')'); db_query('INSERT '.$table.'(user, item) values('.$user_id.', '.$item['id'].')');
}
} }
return db_affected_rows() > 0; return db_affected_rows() > 0;
} }

@ -22,9 +22,15 @@ include_once(ROOT_PATH.'/include/designfunctions.inc.php');
include_once(ROOT_PATH.'/include/bann.inc.php'); include_once(ROOT_PATH.'/include/bann.inc.php');
include_once(ROOT_PATH.'/include/sqlwrapper.inc.php'); include_once(ROOT_PATH.'/include/sqlwrapper.inc.php');
include_once(ROOT_PATH.'/include/random.inc.php'); include_once(ROOT_PATH.'/include/random.inc.php');
include_once(ROOT_PATH.'/include/user.inc.php');
function sendMessage($von, $besitzer, $betreff, $text){ function sendMessage($von, $besitzer, $betreff, $text){
// $betreff = $betreff; // $betreff = $betreff;
if (is_numeric($von)) {
$von = getUser($von)['nickname'];
}
$text = urldecode($text); $text = urldecode($text);
$text = encodeNoHTMLWithBB($text); $text = encodeNoHTMLWithBB($text);
$betreff = urldecode($betreff); $betreff = urldecode($betreff);

@ -41,7 +41,7 @@ function runScheduledTournaments() {
$day_of_month = date('j'); $day_of_month = date('j');
$sql = 'SELECT id FROM tournament_types WHERE (day_of_week = '.$day_of_week.' OR day_of_week is NULL) AND (day_of_month = '.$day_of_month.' or day_of_month is NULL) AND hour_of_day = '.$hour_of_day.' AND id NOT IN (SELECT type from tournament where ausgewertet = FALSE)'; $sql = 'SELECT id FROM tournament_types WHERE (day_of_week = '.$day_of_week.' OR day_of_week is NULL) AND (day_of_month = '.$day_of_month.' or day_of_month is NULL) AND hour_of_day = '.$hour_of_day.' AND id NOT IN (SELECT type from tournament where ausgewertet = FALSE)';
echo $sql; // echo $sql;
$qry = db_query($sql); $qry = db_query($sql);
@ -131,7 +131,7 @@ function retrieveParticipants($tournament_type) {
$sql = 'SELECT count(*) as anzahl from chars c where '.$filter_sql; $sql = 'SELECT count(*) as anzahl from chars c where '.$filter_sql;
echo $sql.'<br>'; // echo $sql.'<br>';
$qry = db_query($sql); $qry = db_query($sql);
$row = mysqli_fetch_assoc($qry); $row = mysqli_fetch_assoc($qry);

Loading…
Cancel
Save