diff --git a/_installer/conf/mysql.php b/_installer/conf/mysql.php index adbbb3b..9836703 100644 --- a/_installer/conf/mysql.php +++ b/_installer/conf/mysql.php @@ -1464,16 +1464,6 @@ function update_mysql_1_6() } $qry = $qrx; //-> Mod/AddOns verwalten - db("CREATE TABLE ".$db['versions']." ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `id_server` INT(11) NOT NULL, - `name` VARCHAR(100) NOT NULL, - `server` LONGTEXT NOT NULL, - `download_link` LONGTEXT NOT NULL, - `own_version` VARCHAR(11) NOT NULL, - `own_date` INT(12) NOT NULL, - PRIMARY KEY (`id`)) ;"); - db("CREATE TABLE ".$db['mods']." ( `author` varchar(32) NOT NULL, `modid` varchar(32) NOT NULL, @@ -1481,6 +1471,7 @@ function update_mysql_1_6() `serverurl` text NOT NULL, `downloadurl` text NOT NULL, `installed` datetime NOT NULL, + `updated` datetime NOT NULL, `serverversion` text NOT NULL, PRIMARY KEY (`author`,`modid`) )"); diff --git a/admin/menu/mods.php b/admin/menu/mods.php index 67c632b..ced5286 100644 --- a/admin/menu/mods.php +++ b/admin/menu/mods.php @@ -13,7 +13,7 @@ */ if(_adminMenu != 'true') exit; -$where = $where.': '._config_version; +$where = $where.': '._config_mods; if($chkMe != 4) { $show = error(_error_wrong_permissions, 1); } else { @@ -28,6 +28,7 @@ 'version' => $get[ 'version' ] , 'server_version' => '?', 'installed' => $get[ 'installed' ], + 'updated' => $get[ 'updated' ], 'dl_link' => $get[ 'downloadurl'] ); $text .= implode(PHP_EOL, $modData); $text .= PHP_EOL . $get['serverurl'] . PHP_EOL . '###'; @@ -37,6 +38,17 @@ $i ++; } } - $show = show ( $dir . '/form_mods', array( 'rows' => $rows, 'support' => $text) ); + $replace = array( 'rows' => $rows, 'support' => $text); + $replace['_mod_head'] = _mod_head; + $replace['_mod_name'] = _mod_name; + $replace['_mod_author'] = _mod_author; + $replace['_mod_yourVersion'] = _mod_yourVersion; + $replace['_mod_link'] = _mod_link; + $replace['_mod_installed'] = _mod_installed; + $replace['_mod_updated'] = _mod_updated; + $replace['_mod_copyAndPasteInfo'] = _mod_copyAndPasteInfo; + $replace['_mod_clickMe'] = _mod_clickMe; + + $show = show ( $dir . '/form_mods', $replace); } ?> \ No newline at end of file diff --git a/admin/menu/version.png b/admin/menu/mods.png similarity index 100% rename from admin/menu/version.png rename to admin/menu/mods.png diff --git a/admin/menu/version.php b/admin/menu/version.php deleted file mode 100644 index a02328e..0000000 --- a/admin/menu/version.php +++ /dev/null @@ -1,301 +0,0 @@ - dropdown("day",date("d",time())), - "month" => dropdown("month",date("m",time())), - "year" => dropdown("year",date("Y",time())))); - - $show = show($dir."/form_version", array("head" => _config_version, - "what" => _button_value_add, - "server_id" => _v_server_id, - "server_name" => _v_server_hover, - "name" => _v_name, - "vown" => _v_own, - "download_link" => _v_download_link, - "odate" => _datum, - "dropdown_date" => $dropdown_date, - "e_server_id" => "", - "e_server_name" => "http://", - "e_name" => "", - "e_vown" => "", - "e_download_link" => "", - "e_odate" => "", - "error" => "", - "do" => "add_sql")); - } -//#################################################################################### - elseif($_GET['do'] == 'add_sql'){ - if(empty($_POST['name']) || empty($_POST['vown'])) - { - $error = _empty_req_fields; - $error = show("errors/errortable", array("error" => $error)); - - $dropdown_date = show(_dropdown_date, array("day" => dropdown("day",$_POST['t']), - "month" => dropdown("month",$_POST['m']), - "year" => dropdown("year",$_POST['j']))); - - $show = show($dir."/form_version", array("head" => _config_version, - "what" => _button_value_add, - "server_id" => _v_server_id, - "server_name" => _v_server_hover, - "name" => _v_name, - "vown" => _v_own, - "download_link" => _v_download_link, - "odate" => _datum, - "dropdown_date" => $dropdown_date, - "e_server_id" => re($_POST['server_id']), - "e_server_name" => re($_POST['server_name']), - "e_name" => re($_POST['name']), - "e_vown" => re($_POST['vown']), - "e_download_link" => re($_POST['download_link']), - "e_odate" => $dropdown_date, - "error" => $error, - "do" => "add_sql")); - - - } else { - - $datum = mktime(0,0,0,$_POST['m'],$_POST['t'],$_POST['j']); - - $qry = db("INSERT INTO ".$db['versions']." - SET `id_server` = '".up($_POST['server_id'])."', - `name` = '".up($_POST['name'])."', - `download_link` = '".up($_POST['download_link'])."', - `own_date` = '".up($datum)."', - `own_version` = '".up($_POST['vown'])."', - `server` = '".links($_POST['server_name'])."'"); - - $show = info(_v_added, "?admin=version"); - } - } -//#################################################################################### - elseif($_GET['do'] == 'delete'){ - $qry = db("DELETE FROM ".$db['versions']." - WHERE id = '".intval($_GET['id'])."'"); - - $show = info(_v_deleted, "?admin=version"); - - } -//#################################################################################### - elseif($_GET['do'] == 'edit'){ - - $qrys = db("SELECT * FROM ".$db['versions']." - WHERE id = '".intval($_GET['id'])."'"); - $gets = _fetch($qrys); - - $dropdown_date = show(_dropdown_date, array("day" => dropdown("day",date("d",$gets['own_date'])), - "month" => dropdown("month",date("m",$gets['own_date'])), - "year" => dropdown("year",date("Y",$gets['own_date'])))); - - $show = show($dir."/form_version", array("head" => _config_version, - "what" => _button_value_edit, - "server_id" => _v_server_id, - "server_name" => _v_server_hover, - "name" => _v_name, - "vown" => _v_own, - "download_link" => _v_download_link, - "odate" => _datum, - "dropdown_date" => $dropdown_date, - "e_server_id" => re($gets['id_server']), - "e_server_name" => re($gets['server']), - "e_name" => re($gets['name']), - "e_vown" => re($gets['own_version']), - "e_download_link" => re($gets['download_link']), - "e_odate" => $dropdown_date, - "error" => $error, - "do" => "edit_sql&id=".$_GET['id']."")); - } -//#################################################################################### - elseif($_GET['do'] == 'edit_sql'){ - - if(empty($_POST['name']) || empty($_POST['vown'])) - { - $error = _empty_req_fields; - $error = show("errors/errortable", array("error" => $error)); - - $dropdown_date = show(_dropdown_date, array("day" => dropdown("day",$_POST['t']), - "month" => dropdown("month",$_POST['m']), - "year" => dropdown("year",$_POST['j']))); - - $show = show($dir."/form_version", array("head" => _config_version, - "what" => _button_value_edit, - "server_id" => _v_server_id, - "server_name" => _v_server_hover, - "name" => _v_name, - "vown" => _v_own, - "download_link" => _v_download_link, - "odate" => _datum, - "dropdown_date" => $dropdown_date, - "e_server_id" => re($_POST['server_id']), - "e_server_name" => re($_POST['server_name']), - "e_name" => re($_POST['name']), - "e_vown" => re($_POST['vown']), - "e_download_link" => re($_POST['download_link']), - "e_odate" => $dropdown_date, - "error" => $error, - "do" => "edit_sql&id=".$_GET['id']."")); - - - } - else - { - $datum = mktime(0,0,0,$_POST['m'],$_POST['t'],$_POST['j']); - $qry = db("UPDATE ".$db['versions']." - SET `id_server` = '".up($_POST['server_id'])."', - `name` = '".up($_POST['name'])."', - `download_link` = '".up($_POST['download_link'])."', - `own_date` = '".up($datum)."', - `own_version` = '".up($_POST['vown'])."', - `server` = '".links($_POST['server_name'])."' - WHERE id = '".intval($_GET['id'])."'"); - - $show = info(_v_edited, "?admin=version"); - - } - } -//#################################################################################### - else { - - - $qry = db("SELECT * FROM ".$db['versions']." ORDER BY own_date ASC"); - while($get = _fetch($qry)) - { - unset($server_part); - - //Dateie(n) einlesen - if($_GET['do'] == 'get') { - if(function_exists('fsockopen')) - { - if($get['server'] != '') { - if(@file($get['server'])){ - $zeilen = file ($get['server']); - foreach ($zeilen as $zeile) { - $server_part = explode(";", $zeile); //Zeile in Bl�cke teilen - if($server_part[0] == $get['id_server']) //ID-Block = DB-ID ?? - { - break; - } - } - } - } - } //if - } //if - //Anzeige - $edit = show("page/button_edit_single", array("id" => $get['id'], - "action" => "admin=version&do=edit", - "title" => _button_title_edit)); - $delete = show("page/button_delete_single", array("id" => $get['id'], - "action" => "admin=version&do=delete", - "title" => _button_title_del, - "del" => convSpace(_confirm_del_version))); - - - $class = ($color % 2) ? "contentMainSecond" : "contentMainFirst"; $color++; - - $more = ''.$get['server'].''; - - if($get['own_version'] < $server_part[1]) - { - $oversion = ''.$get['own_version'].''; - $sversion = ''.$server_part[1].''; - } - else - { - $oversion = ''.$get['own_version'].''; - $sversion = ''.$server_part[1].''; - } - if($get['server'] == '') - { - $sdate = _v_no_server; - } - else - { - if($_GET['do'] == 'get') - { - if($server_part[2] != '') - { - $sdate = date("d.m.Y",$server_part[2]); - } elseif(!function_exists('fsockopen')) { - $sdate = ''._v_fsockopen_not_allowed.''; - } else { - $sdate = ''._v_unknown.''; - } - } - else - { - $sdate = ''._v_no_data.''; - } - } - $kats .= show($dir."/versions_show", array("class" => $class, - "img" => $img, - "name" => $get['name'], - "oversion" => $oversion, - "sversion" => $sversion, - "odate" => date("d.m.Y",$get['own_date']), - "sdate" => $sdate, - "delete" => $delete, - "more" => $more, - "edit" => $edit)); - } - - $show = show($dir."/versions", array("head" => _config_version, - "name" => _v_name, - "own" => _v_own, - "get_data" => _v_get_data, - "server" => _v_server, - "kats" => $kats, - "add" => _config_v_add)); - } //do else ende - } //permission else ende - -?> \ No newline at end of file diff --git a/inc/_templates_/version1.5/admin/form_mods.html b/inc/_templates_/version1.5/admin/form_mods.html index fe63067..46867ab 100644 --- a/inc/_templates_/version1.5/admin/form_mods.html +++ b/inc/_templates_/version1.5/admin/form_mods.html @@ -1,15 +1,19 @@ + + [_mod_head] + # - Autor - Mod - installierte Version - verfügbare Version - installiert am + [_mod_name] + [_mod_author] + [_mod_yourVersion] + [_mod_installed] + [_mod_updated] + [_mod_link] [rows] - + - + - + + \ No newline at end of file diff --git a/inc/_templates_/version1.5/admin/form_version.html b/inc/_templates_/version1.5/admin/form_version.html deleted file mode 100644 index a515117..0000000 --- a/inc/_templates_/version1.5/admin/form_version.html +++ /dev/null @@ -1,74 +0,0 @@ -
Copy und Pate Info[_mod_copyAndPasteInfo]
diff --git a/inc/_templates_/version1.5/admin/form_mods_row.html b/inc/_templates_/version1.5/admin/form_mods_row.html index 972a833..d041b01 100644 --- a/inc/_templates_/version1.5/admin/form_mods_row.html +++ b/inc/_templates_/version1.5/admin/form_mods_row.html @@ -1,8 +1,9 @@
[number][author] [modid][author] [version][server_version] [installed][updated][_mod_clickMe]
- - - - -
- -
- - - - - [error] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[head]
[name]*: - -
[vown]*: - -
[odate]:[dropdown_date]
[download_link]: - -
[server_name]: - -
[server_id]: - -
-
-
- - - - \ No newline at end of file diff --git a/inc/_templates_/version1.5/admin/versions.html b/inc/_templates_/version1.5/admin/versions.html deleted file mode 100644 index 9861e44..0000000 --- a/inc/_templates_/version1.5/admin/versions.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - -[kats] - - - \ No newline at end of file diff --git a/inc/_templates_/version1.5/admin/versions_show.html b/inc/_templates_/version1.5/admin/versions_show.html deleted file mode 100644 index de828f6..0000000 --- a/inc/_templates_/version1.5/admin/versions_show.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/inc/bbcode.php b/inc/bbcode.php index 02e5bf1..1c0c55f 100644 --- a/inc/bbcode.php +++ b/inc/bbcode.php @@ -1973,7 +1973,13 @@ function count_clicks($side_tag='',$clickedID=0) return false; } -//Mods und Api Laden +//-> Sprachdefinitionen in Index ausgeben +function fetchLanguage($lng) { + @eval("$name = ".$lng.";"); + return defined($lng) ? $name : $lng; +} + +//-> Mods und Api Laden include_once(basePath.'/inc/mod_api.php'); //-> Navigation einbinden @@ -2080,8 +2086,9 @@ function page($index,$title,$where,$time,$wysiwyg='',$index_templ=false) { if(strstr($pholder[$i], 'nav_')) $arr[$pholder[$i]] = navi($pholder[$i]); - else - { + else if(strstr($pholder[$i], 'lang_')) { + $arr[".$pholder[$i]."] = fetchLanguage(substr($pholder[$i], 3)); + } else { if(@file_exists(basePath.'/inc/menu-functions/'.$pholder[$i].'.php')) include_once(basePath.'/inc/menu-functions/'.$pholder[$i].'.php'); diff --git a/inc/lang/languages/deutsch.php b/inc/lang/languages/deutsch.php index 57e055b..58ad3cf 100644 --- a/inc/lang/languages/deutsch.php +++ b/inc/lang/languages/deutsch.php @@ -3,23 +3,16 @@ define('_charset', 'iso-8859-1'); ## ADDED FOR 1.6 Final -define('_config_version', 'Mod/AddOns verwalten'); -define('_v_head', 'Mod/AddOn Versionen verwalten'); -define('_v_name', 'Mod/AddOn Name'); -define('_v_own', 'eigene Version'); -define('_v_server', 'aktuelle Version'); -define('_config_v_add', 'Mod/AddOn hinzufügen'); -define('_v_server_hover', 'Versionsprüfung auf'); -define('_v_unknown', 'unbekannt'); -define('_v_fsockopen_not_allowed', 'fsockopen nicht erlaubt'); -define('_v_no_data', 'Daten nicht abgerufen'); -define('_v_get_data', 'Daten abrufen'); -define('_v_server_id', 'Mod/AddOn ID auf Server'); -define('_v_download_link', 'Mod/AddOn Download Link'); -define('_v_added', 'Mod/AddOn hinzugefügt'); -define('_v_edited', 'Mod/AddOn erfolgreich bearbeitet'); -define('_confirm_del_version', 'Es wird nur der Eintrag aus dieser Liste gelöscht, wirklich löschen?'); -define('_v_no_server', 'Kein Kontrollserver'); +define('_config_mods', 'Mod/AddOns Übersicht'); +define('_mod_head', 'Mod/AddOn Übersicht'); +define('_mod_author', 'Autor'); +define('_mod_name', 'Name'); +define('_mod_yourVersion', 'eigene Version'); +define('_mod_link', 'Link'); +define('_mod_installed', 'installiert am'); +define('_mod_updated', 'aktualisiert am'); +define('_mod_copyAndPasteInfo', 'Copy und Paste Informationen'); +define('_mod_clickMe', 'klick mich'); define('_search_con_or', 'mind. ein Wort muss vorhanden sein'); define('_search_con_and', 'absolute Übereinstimmung'); diff --git a/inc/lang/languages/english.php b/inc/lang/languages/english.php index e84c65b..452d2c5 100644 --- a/inc/lang/languages/english.php +++ b/inc/lang/languages/english.php @@ -3,23 +3,16 @@ define('_charset', 'iso-8859-1'); ## ADDED FOR 1.6 Final -define('_config_version', 'Mod/AddOns manager'); -define('_v_head', 'Mod/AddOn version manager'); -define('_v_name', 'Mod/AddOn name'); -define('_v_own', 'own version'); -define('_v_server', 'latest version'); -define('_config_v_add', 'add Mod/AddOn'); -define('_v_server_hover', 'Check version on'); -define('_v_unknown', 'unknown'); -define('_v_fsockopen_not_allowed', 'fsockopen not allowed'); -define('_v_no_data', 'no data requested'); -define('_v_get_data', 'request data'); -define('_v_server_id', 'Mod/AddOn ID on server'); -define('_v_download_link', 'Mod/AddOn download link'); -define('_v_added', 'Mod/AddOn added'); -define('_v_edited', 'Mod/AddOn successfully added'); -define('_confirm_del_version', 'It only removes the entry from this list, delete?'); -define('_v_no_server', 'no control server'); +define('_config_mods', 'Mod/AddOns Overview'); +define('_mod_head', 'Mod/AddOn Overview'); +define('_mod_author', 'Author'); +define('_mod_name', 'Name'); +define('_mod_yourVersion', 'own Version'); +define('_mod_link', 'Link'); +define('_mod_installed', 'installed on'); +define('_mod_updated', 'updated on'); +define('_mod_copyAndPasteInfo', 'Copy and Paste Information'); +define('_mod_clickMe', 'click me'); define('_search_con_or', 'at least one word'); define('_search_con_and', 'character by character'); @@ -607,7 +600,7 @@ define('intern' , 'Internal'); define('_comments_head' , 'Comments'); define('_click_close' , 'close'); -## Begrüßungen ## +## Begrungen ## define('_welcome_18' , 'Good evening,'); define('_welcome_13' , 'Good day,'); define('_welcome_11' , 'Good lunch,'); @@ -796,7 +789,7 @@ '); -## Globale Userränge ## +## Globale Userrnge ## define('_status_banned' , 'banned'); define('_status_unregged' , 'unregistered'); define('_status_user' , 'User'); @@ -894,7 +887,7 @@ define('_forum_online_head' , 'Browsing the board'); define('_forum_nobody_is_online' , 'Right now no user is browsing the board!'); define('_forum_nobody_is_online2' , 'Right now no user except you is browsing the board!'); -## Gästebuch ## +## Gstebuch ## define('_gb_delete_successful' , 'The entry was successfully deleted!'); define('_gb_head' , 'Guestbook'); define('_gb_add_head' , 'Insert entry'); diff --git a/inc/mod_api.php b/inc/mod_api.php index 220ba77..855999b 100644 --- a/inc/mod_api.php +++ b/inc/mod_api.php @@ -12,12 +12,12 @@ function addMod($author, $modid, $installedversion, $serverurl, $downloadurl) if(self::existsMod($author, $modid)) return false; - if(db('INSERT INTO ' . $db['mods'] . ' (`author`, `modid`, `version`, `serverurl`, `downloadurl`, `installed`) ' . + if(db('INSERT INTO ' . $db['mods'] . ' (`author`, `modid`, `version`, `serverurl`, `downloadurl`, `installed`, `updated`) ' . 'VALUES ("' . mysql_real_escape_string ($author) . '", "' . mysql_real_escape_string ($modid) . '", "' . mysql_real_escape_string ($installedversion) . '", "' . mysql_real_escape_string ($serverurl) . '", "' . - mysql_real_escape_string ($downloadurl) . '",NOW())' )) + mysql_real_escape_string ($downloadurl) . '",NOW(), NOW())' )) { wire_ipcheck('mod_add('.$modid.')'); return true; @@ -38,7 +38,7 @@ function updateMod($author, $modid, $newversion) if(!self::existsMod($author, $modid)) return false; - if(db('UPDATE ' . $db['mods'] . ' SET version = "' . mysql_real_escape_string ($newversion) . '", installed = NOW() ' . + if(db('UPDATE ' . $db['mods'] . ' SET version = "' . mysql_real_escape_string ($newversion) . '", updated = NOW() ' . ' WHERE author = "' . mysql_real_escape_string ($author) . '" AND modid = "' . mysql_real_escape_string ($modid) . '"')) { wire_ipcheck('mod_upd('.$modid.')');
-
-
[head]
[name][own][server]
-
- - -
- -
[name][oversion][odate][sversion][sdate][more][edit][delete]