Genau das gleiche Problem hab ich auch, wie ich ja in meinem anderen Thread bereits schrieb.
Kannst du News usw verfassen oder geht das auch bei dir nicht?
Kannst du News usw verfassen oder geht das auch bei dir nicht?
sites/shop.phpQuote:
Hey, ich habe ein kleines Problem.
Ich habe neue Files aufgespielt und es läuft alles super.
Die Webseite läuft soweit auch perfekt, aber der Shop nicht.
Ich kann mir ein Item kaufen und es werden auch die Punkte abgezogen,
aber das Item wird/kann nicht versendet werden.
Kann mir einer sagen was das Problem sein könnte?
Edit: Ach ja das passierte erst vor 2-3 Tagen, das es nicht mehr ging...
if( @odbc_exec($odbc_connect, $strUpdateBalance)
AND
@odbc_exec($odbc_connect, '
INSERT INTO [' . $_CONFIG['db_databases']['web'] . '].dbo.[LOG_PURCHASES] (
item,
itemname,
itemcount,
itemcurrency,
itemworth,
account,
datetime
) VALUES (
' . cleanSqlInput($mixedSelectedItemDetailsArray['itemid']) . ',
\'' . cleanSqlInput($mixedSelectedItemDetailsArray['name']) . '\',
' . cleanSqlInput($mixedSelectedItemDetailsArray['count']) . ',
' . $intGetCurrentCurrency . ',
' . cleanSqlInput($mixedSelectedItemDetailsArray[$intWorthColumnHelper]) . ',
\'' . cleanSqlInput($_SESSION['user']) . '\',
\''. date($_CONFIG['web_date_format']['dbDatetime']) .'\'
)
')
AND
send_item($intCharacterID, $mixedSelectedItemDetailsArray['itemid'], $mixedSelectedItemDetailsArray['count'])
)
function send_item($playerid, $itemid, $quantity) {
global $odbc_connect, $_CONFIG;
if(is_numeric($playerid) AND is_numeric($itemid) AND is_numeric($quantity)) {
if( @odbc_exec($odbc_connect, '
INSERT INTO [' . $_CONFIG['db_databases']['chr'] . '].dbo.[ITEM_SEND_TBL] (
m_idPlayer,
serverindex,
Item_Name,
Item_count,
idSender
) VALUES (
\''.$playerid.'\',
\'01\',
\''.$itemid.'\',
\''.$quantity.'\',
\'0000000\'
)
')) {
return true;
}
else {
return false;
}
}
else {
return false;
}
}
Also hab das jetzt mal geändert und es geht :) :) Danke erstmal dafürQuote:
Dies hängt in der Regel von der Sprachversion des SQL Servers ab, auf dem die Datenbank liegt:
Deutsch
'dbDatetime' => 'Y-d-m H:i:s'
Englisch
'dbDatetime' => 'Y-m-d H:i:s'
Bei Downloads und News ist es das selbe in grün:Quote:
Also hab das jetzt mal geändert und es geht :) :) Danke erstmal dafür
Hoffe aber das es nicht wieder nur für 1-2 Tage ist , weil hatte das zwischendurch auch schonmal das es ging und dann 2 Tage später wieder nicht ;)
was aber leider immer noch nicht geht sind News oder Downloads eintragen. Kann nur alte vorhandene verändern
odbc_exec($odbc_connect, 'INSERT INTO [web_news](title,text,author,category,datetime,forenlink) VALUES(\''.mssql_escape_string($_POST['title']).'\', \''.mssql_escape_string($_POST['content']).'\', \''.mssql_escape_string($_POST['author']).'\', \''.mssql_escape_string($_POST['category']).'\', \''.date('d.m.Y H:i:s').'\',\''.mssql_escape_string($_POST['forenlink']).'\')');
odbc_exec($odbc_connect, 'INSERT INTO [web_downloads](title, description, link, datetime) VALUES(\''.mssql_escape_string($_POST['title']).'\', \''.mssql_escape_string($_POST['description']).'\', \''.mssql_escape_string($_POST['link']).'\', \''.date('d.m.Y H:i:s').'\')');
Kannst dir ja selbst denken, wie es richtig gehört. :)Quote:
date('d.m.Y H:i:s')
Die Dateien im Adminpanel meine ich natürlich.Quote:
und nochmals danke, aber leider sehen die beiden bei mir anders aus.
Hoffe habe die richtigen Dateien auch erwischt :D
<?php if(!defined('access')) {die("The requested resource has been removed or renamed or is temporarily unavailable.");} ?>
<?php
/**
* Navigation Class by Icetea'
* Created 2015-03-01, Sublime Text 2
*/
class navigation {
public $link;
public function link($href, $tooltip, $title) {
$lower = strtolower($href);
if('index.php?site='.$_GET['site'] == $lower) {
$this->link = '<a href="' . $href . '" title="' . $tooltip . '" style="background: hsla(0, 0%, 0%, 0.10); border: 1px solid hsla(200, 100%, 50%, 0.7);">' . $title . '</a>';
} else {
if($lower == '' && empty($_GET['site'])) {
$this->link = '<a href="' . $href . '" title="' . $tooltip . '">' . $title . '</a>';
} else {
$this->link = '<a href="' . $href . '" title="' . $tooltip . '">' . $title . '</a>';
}
}
echo $this->link;
}
}
$nav->link('index.php?site=deineseite', 'Tooltip', 'Titel der Seite');
<?php if(!defined('access')) {die("Die gesuchte Ressource wurde entfernt oder umbenannt, oder sie steht vorübergehend nicht zur Verfügung.");}?>
<p class="navigation">
<?php
$nav->link('index.php?site=news', $_LANG['navigation_home_title'], $_LANG['navigation_home']);
$nav->link($_CONFIG['web_forum'], $_LANG['navigation_forum_title'], $_LANG['navigation_forum']);
$nav->link('index.php?site=download', $_LANG['navigation_download_title'], $_LANG['navigation_download']);
$nav->link('index.php?site=register', $_LANG['navigation_regist_title'], $_LANG['navigation_regist']);
$nav->link('index.php?site=rankings', $_LANG['navigation_ranking_title'], $_LANG['navigation_ranking']);
$nav->link('index.php?site=donate', $_LANG['navigation_donate_title'], $_LANG['navigation_donate']);
$nav->link('index.php?site=shop', $_LANG['navigation_shop_title'], $_LANG['navigation_shop']);
$nav->link('index.php?site=rules', $_LANG['navigation_rules_title'], $_LANG['navigation_rules']);
$nav->link('index.php?site=faqs', $_LANG['navigation_faqs_title'], $_LANG['navigation_faqs']);
$nav->link('index.php?site=staff', $_LANG['navigation_team_title'], $_LANG['navigation_team']);
$nav->link('index.php?site=ticketsystem', $_LANG['navigation_ticketsystem_title'], $_LANG['navigation_ticketsystem']);
?>
</p>
require_once('includes/xinc_navigation.php');
$nav = new navigation;
<?php if (!defined('access')) {die("Die gesuchte Ressource wurde entfernt oder umbenannt, oder sie steht vorübergehend nicht zur Verfügung.");} ?>
<?php
if ($_CONFIG['vote_enabled'] AND count($_CONFIG['vote_toplists']) > 0) {
foreach ($_CONFIG['vote_toplists'] as $intTopListID => $mixedTopListArray) {
if(isset($_POST['submitVote'.$intTopListID])) {
$strVoteErrorArray = array();
$intRecheckIPVotingTime = time() - $mixedTopListArray['timeLimit'];
$intTimestampOfLastVoteBeforeVote = @odbc_exec($odbc_connect, 'SELECT TOP 1 [timestamp] FROM [' . $_CONFIG['db_databases']['web'] . '].[dbo].[LOG_VOTE] WHERE [ip] = \'' . $_SERVER['REMOTE_ADDR'] . '\' AND [account] = \'' . cleanSqlInput($_SESSION['user']) . '\' AND [toplist] = ' . $intTopListID . ' AND [timestamp] > ' . $intRecheckIPVotingTime . ' ORDER BY [id] DESC');
$intRecheckIP = @odbc_num_rows($intTimestampOfLastVoteBeforeVote);
if(isSpamming($_POST['inputCheckTimestamp'], $_POST['inputCheckKey'], $_SESSION['inputCheckKey'])) {
$strVoteErrorArray[] = $_LANG['error_spam'];
}
if($intRecheckIP > 0) {
$strVoteErrorArray[] = $_LANG['error_already_voted'];
}
if(count($strVoteErrorArray) > 0) {
echo createMessage($strVoteErrorArray, 'fail');
}
else {
if( @odbc_exec($odbc_connect, '
INSERT INTO [' . $_CONFIG['db_databases']['web'] . '].[dbo].[LOG_VOTE] (
[account],
[ip],
[toplist],
[timestamp],
[character]
) VALUES (
\''.cleanSqlInput($_SESSION['user']).'\',
\''.$_SERVER['REMOTE_ADDR'].'\',
'.$intTopListID.',
'.time().',
\'\'
)
')
) {
sleep($_CONFIG['vote_timedelay']);
if(isset($_SESSION['user'])) {
@odbc_exec($odbc_connect, '
UPDATE [' . $_CONFIG['db_databases']['acc'] . '].[dbo].[ACCOUNT_TBL]
SET [votepoints] = [votepoints] + ' . $mixedTopListArray['earnVotePoints'] . '
WHERE [account] = \'' . cleanSqlInput($_SESSION['user']) . '\'
');
}
echo createMessage($_LANG['success_voting'], 'success');
}
else {
echo createMessage($_LANG['error_no_points_added'], 'fail');
}
}
}
$intCheckIPVotingTime = time() - $mixedTopListArray['timeLimit'];
$intTimestampOfLastVote = @odbc_exec($odbc_connect, '
SELECT TOP 1 [timestamp]
FROM [' . $_CONFIG['db_databases']['web'] . '].[dbo].[LOG_VOTE]
WHERE [ip] = \'' . $_SERVER['REMOTE_ADDR'] . '\' AND
[toplist] = ' . $intTopListID . ' AND
[timestamp] > ' . $intCheckIPVotingTime . '
ORDER BY [id] DESC
');
$checkIP = @odbc_num_rows($intTimestampOfLastVote);
if($checkIP < 1) {
$strVoteButtonText = $_LANG['vote_on'] . ' ' . ''. $mixedTopListArray['name'] .'';
$strVoteButtonDisabled = '';
$strVoteButtonOnclick = 'id="voteFormOpener' . $intTopListID . '" onclick="switching(\'voteForm'.$intTopListID.'\');"';
}
else {
$strVoteButtonText = $_LANG['next_vote'] . ' ' . date($_CONFIG['web_date_format']['hours'], $mixedTopListArray['timeLimit'] + @odbc_result($intTimestampOfLastVote, 'timestamp')) . ' ' . $_LANG['oclock_optional'];
$strVoteButtonDisabled = 'disabled="disabled"';
$strVoteButtonOnclick = '';
}
echo '<input ' . $strVoteButtonOnclick . ' type="submit" class="p100" value="' . $strVoteButtonText . '" style="margin:2px auto;" ' . $strVoteButtonDisabled . '/>';
if($checkIP < 1) {
echo '
<p id="voteFormWaiting' . $intTopListID . '" class="center" style="display:none; margin-bottom: 15px;">
' . $_LANG['wait_for_toplists_answer'] . '
<br /><img src="/images/icons/misc/loading.gif" title="' . $_LANG['wait_for_toplists_answer'] . '" alt=""/>
</p>
<form method="post" id="voteForm' . $intTopListID . '" style="display:none; margin-bottom: 15px;">
<input type="hidden" name="inputCheckTimestamp" value="' . time() . '" />
<input type="hidden" name="inputCheckKey" value="' . random_string() . '" />';
if(isset($_SESSION['user'])) {echo '
<p style="margin: 10px 0;" class="x02 right">
<span class="span">' . $_LANG['you_receive'] . '</span>' . $mixedTopListArray['earnVotePoints'] . ' VPs
</p>';
} echo '
<div>
<input class="votebutton" style="margin-right: 6px; margin-top: 6px;" type="submit" value="' . $_LANG['button_vote'] . '" name="submitVote' . $intTopListID . '" onclick="openVoteSite(\'' . $mixedTopListArray['link'] . '\'); switching(\'voteForm' . $intTopListID . '\'); switching(\'voteFormWaiting' . $intTopListID . '\'); jQuery(\'#voteFormOpener' . $intTopListID . '\').attr(\'onclick\',\'\').unbind(\'click\');"/>
<p class="zehn voteNotice">' . $_LANG['voting_additional_information'] . '</p>
</div>
<p class="clear"></p>
</form>';
}
$intTopListID++;
}
}
else {
echo createMessage($_LANG['notify_votescript_deactivated'], 'hint');
}
Das System funktioniert nicht -> Wenn man auf die Navigation klick geht man automatisch zurück auf die Deutsche Website.Quote:
Viel Spaß damit. :p Download der en.php ist im Anhang dieses Posts zu finden.
Ich habe bei dieser Version der SF-Webseite das Multi-Language Script von Tim fertiggestellt, so dass man dieses auch nutzen kann.
Das ersetzt ihr mit dem Inhalt der xinc_lang.php
Also es wird mit einem GET-Parameter abgefragt, nicht mit einem POST-Parameter, sowie Tim das eigentlich damals vorhatte, heute läuft es bei Forsaken ebenfalls über einen GET-Parameter.PHP Code:<?php
include('xinc_config.php');
if(isset($_GET['changeLanguage'])) {
$_SESSION['lang'] = $_GET['changeLanguage'];
}
$_GET['lang'] = preg_replace('/[^A-Za-z0-9]/', '', $_GET['lang']);
$pathCorrection = '';
if(strpos($_SERVER['REQUEST_URI'], 'includes') > 0) {
$pathCorrection = '../';
}
if(isset($_GET['lang']) && file_exists('lang/' . $_GET['lang'] . '.php')) {
require_once($pathCorrection . 'lang/' . $_GET['lang'] . '.php');
}
elseif(isset($_SESSION['lang']) && file_exists('lang/' . $_SESSION['lang'] . '.php')) {
require_once($pathCorrection . 'lang/' . $_SESSION['lang'] . '.php');
}
else {
$_SESSION['lang'] = $_CONFIG['web_default_lang'];
require_once($pathCorrection . 'lang/' . $_CONFIG['web_default_lang'] . '.php');
}
In die xinc_footer.php, oder wo ihr die Flaggen hinhaben wollt fügen wir das hier ein:
Die Texte innerhalb der <a> Tags könnt ihr dann ggf. durch Flaggen ersetzen die in dem Icon-Ordner enthalten sind.PHP Code:<a href="index.php?site=<?php echo $_GET['site']; ?>&lang=de">German</a> <a href="index.php?site=<?php echo $_GET['site']; ?>&lang=en">English</a>
Liebe Grüße,
Icetea'
Quote:
Das System funktioniert nicht -> Wenn man auf die Navigation klick geht man automatisch zurück auf die Deutsche Website.
<?php if (!defined('access')) {die("Die gesuchte Ressource wurde entfernt oder umbenannt, oder sie steht vorübergehend nicht zur Verfügung.");}
include('xinc_config.php');
if(isset($_GET['lang'])) {
$lang = $_GET['changeLanguage'];
$_SESSION['lang'] = $lang;
setcookie('lang', $lang, time() + (3600 * 24 * 30),"/");
} elseif(isset($_SESSION['lang'])) {
$lang = $_SESSION['lang'];
} elseif(isset($_COOKIE['lang'])) {
$lang = $_COOKIE['lang'];
} else {
$lang = $_CONFIG['web_default_lang'];
}
switch($lang) {
case 'en':
$file = 'file_en.php';
break;
case 'de':
$file = 'file_de.php';
break;
default:
$file = 'standard file.php';
}
require_once '../lang/'.$file;
$file = ($lang == 'en' || $lang == 'de' ? ($lang == 'de' ? 'file_de.php' : 'file_en.php') : 'standard file.php');
Wie wäre es wenn du mal den Support der Sapphire Website übernimmst, weil du es eindeutig besser kannst ^^Quote:
Habe es mittlerweile selbst anders gelöst. Geht auch so ähnlich hab das jetzt schnell geschrieben. Don't copy & paste. Schreibe demnächst einfach mal ein komplett neues für die Sapphire Seite die dann auch jeder nutzen kann. :)PHP Code:<?php
include('xinc_config.php');
if(isset($_GET['lang'])) {
$lang = $_GET['changeLanguage'];
$_SESSION['lang'] = $lang;
setcookie('lang', $lang, time() + (3600 * 24 * 30));
} elseif(isset($_SESSION['lang'])) {
$lang = $_SESSION['lang'];
} elseif(isset($_COOKIE['lang'])) {
$lang = $_COOKIE['lang'];
} else {
$lang = $_CONFIG['web_default_lang'];
}
switch($lang) {
case 'en':
$file = 'file_en.php';
break;
case 'de':
$file = 'file_de.php';
break;
default:
$file = 'standard file.php';
}
Liebe Grüße,
Icetea'
[COLOR="Magenta"][Date][/COLOR] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = Europe/Stockholm ; http://php.net/date.default-latitude date.default_latitude = 69,0598 ; http://php.net/date.default-longitude date.default_longitude = 20,5473 ; http://php.net/date.sunrise-zenith date.sunrise_zenith = 90.583333 ; http://php.net/date.sunset-zenith date.sunset_zenith = 90.583333
You know that you can change your timezone in xinc_config.php?Quote:
To those who are well not in europe who intend to use this please be aware that you have to update your PHP timezone with a country in europe via php.ini. Otherwise you'll encounter tons of issues with time stamps and dates/time.
This only needs to happen if your server is not in europe and(or) your doing testing locally at home while not in europe.
Will work fine, be sure to reboot php after. If you don't want to do that, then your only other solution is to convert the time/date via the site itself.Code:[COLOR="Magenta"][Date][/COLOR] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = Europe/Stockholm ; http://php.net/date.default-latitude date.default_latitude = 69,0598 ; http://php.net/date.default-longitude date.default_longitude = 20,5473 ; http://php.net/date.sunrise-zenith date.sunrise_zenith = 90.583333 ; http://php.net/date.sunset-zenith date.sunset_zenith = 90.583333