Version 1.3.0
This commit is contained in:
1 parent
7ef3d1712a
commit
f87d29ba65
290 files changed
+50206
-17930
No files matched your search
@@ -2,15 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Board v1.1
|
||||
| Invision Power Board v1.3 Final
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001,2002 Invision Power Services
|
||||
| http://www.ibforums.com
|
||||
| (c) 2001 - 2003 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.ibforums.com
|
||||
| Email: phpboards@ibforums.com
|
||||
| Licence Info: phpib-licence@ibforums.com
|
||||
| Web: http://www.invisionboard.com
|
||||
| Time: Sun, 04 Jan 2004 00:30:16 GMT
|
||||
| Release: 28e7bfb25f08ac72a789cb1b172fa185
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Language functions
|
||||
@@ -21,6 +23,11 @@
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
$idx = new ad_langs();
|
||||
|
||||
@@ -30,7 +37,20 @@ class ad_langs {
|
||||
var $base_url;
|
||||
|
||||
function ad_langs() {
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
//---------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//---------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
//---------------------------------------
|
||||
|
||||
switch($IN['code'])
|
||||
{
|
||||
@@ -92,7 +112,7 @@ class ad_langs {
|
||||
|
||||
function make_default()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
|
||||
|
||||
$new_dir = stripslashes(urldecode(trim($HTTP_GET_VARS['id'])));
|
||||
|
||||
@@ -119,14 +139,14 @@ class ad_langs {
|
||||
|
||||
function doimport()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
if ($IN['tarball'] == "")
|
||||
{
|
||||
$ADMIN->error("You did not select a tar-chive to import!");
|
||||
}
|
||||
|
||||
require $root_dir."sources/lib/tar.php";
|
||||
require ROOT_PATH."sources/lib/tar.php";
|
||||
|
||||
$to_dir = $INFO['base_dir']."lang";
|
||||
|
||||
@@ -218,7 +238,7 @@ class ad_langs {
|
||||
|
||||
function import()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
$ADMIN->page_detail = "The tar-chive that you wish to import must reside in 'archive_in' and be a valid tar-chive uploaded in binary format.";
|
||||
$ADMIN->page_title = "Language Pack Import";
|
||||
@@ -269,7 +289,7 @@ class ad_langs {
|
||||
|
||||
function export()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
if ($IN['id'] == "")
|
||||
{
|
||||
@@ -290,7 +310,7 @@ class ad_langs {
|
||||
$archive_dir = $INFO['base_dir']."/archive_out";
|
||||
$lang_dir = $INFO['base_dir']."/lang/".$row['ldir'];
|
||||
|
||||
require $root_dir."sources/lib/tar.php";
|
||||
require ROOT_PATH."sources/lib/tar.php";
|
||||
|
||||
if (!is_dir($archive_dir))
|
||||
{
|
||||
@@ -359,7 +379,7 @@ class ad_langs {
|
||||
|
||||
function show_file()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
if ($IN['id'] == "")
|
||||
{
|
||||
@@ -400,7 +420,8 @@ class ad_langs {
|
||||
|
||||
if ($IN['lang_file'] == 'email_content.php')
|
||||
{
|
||||
$lang = $EMAIL;
|
||||
$lang = $EMAIL;
|
||||
$is_email = 1;
|
||||
}
|
||||
|
||||
if ( ! is_writeable($lang_file) )
|
||||
@@ -450,10 +471,19 @@ class ad_langs {
|
||||
$rows = 15;
|
||||
|
||||
$cols = 70;
|
||||
|
||||
|
||||
if ( isset($SUBJECT[ $k ]) )
|
||||
{
|
||||
$subj = "Subject: ".$SKIN->form_input('SS_'.$k, $SUBJECT[ $k ] )."<br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$subj = "";
|
||||
}
|
||||
|
||||
$ADMIN->html .= $SKIN->add_td_row( array(
|
||||
"<ibf.lang.<b>".$k."</b>>",
|
||||
$SKIN->form_textarea('XX_'.$k, $v, $cols, $rows),
|
||||
$subj.$SKIN->form_textarea('XX_'.$k, $v, $cols, $rows),
|
||||
) );
|
||||
}
|
||||
else
|
||||
@@ -486,7 +516,7 @@ class ad_langs {
|
||||
|
||||
function edit_info()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
|
||||
if ($IN['id'] == "")
|
||||
{
|
||||
@@ -525,7 +555,7 @@ class ad_langs {
|
||||
|
||||
function add_language()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
|
||||
if ($IN['id'] == "")
|
||||
{
|
||||
@@ -546,14 +576,14 @@ class ad_langs {
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
if ( ! is_writeable($root_path.'lang') )
|
||||
if ( ! is_writeable(ROOT_PATH.'lang') )
|
||||
{
|
||||
$ADMIN->error("The directory 'lang' is not writeable by this script. Please check the permissions on that directory. CHMOD to 0777 if in doubt and try again");
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
if ( ! is_dir($root_path.'lang/'.$row['ldir']) )
|
||||
if ( ! is_dir(ROOT_PATH.'lang/'.$row['ldir']) )
|
||||
{
|
||||
$ADMIN->error("Could not locate the original language set to copy, please check and try again");
|
||||
}
|
||||
@@ -611,7 +641,7 @@ class ad_langs {
|
||||
|
||||
function remove()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
|
||||
//+-------------------------------
|
||||
|
||||
@@ -645,6 +675,8 @@ class ad_langs {
|
||||
$ADMIN->error("You cannot remove this language pack while it is the default language directory. Please select another pack to be the default and try again");
|
||||
}
|
||||
|
||||
$DB->query("UPDATE ibf_members SET language='{$INFO['default_language']}' WHERE language='{$row['ldir']}'");
|
||||
|
||||
if ( $ADMIN->rm_dir( $INFO['base_dir']."lang/".$row['ldir'] ) )
|
||||
{
|
||||
|
||||
@@ -667,7 +699,7 @@ class ad_langs {
|
||||
|
||||
function save_langfile()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
|
||||
//+-------------------------------
|
||||
|
||||
@@ -688,7 +720,7 @@ class ad_langs {
|
||||
$ADMIN->error("Could not query the language information from the database");
|
||||
}
|
||||
|
||||
$lang_file = $root_path."lang/".$row['ldir']."/".$IN['lang_file'];
|
||||
$lang_file = ROOT_PATH."lang/".$row['ldir']."/".$IN['lang_file'];
|
||||
|
||||
if (! file_exists( $lang_file ) )
|
||||
{
|
||||
@@ -731,6 +763,11 @@ class ad_langs {
|
||||
foreach($barney as $key => $text)
|
||||
{
|
||||
$text = preg_replace("/n{1,}$/", "", $text);
|
||||
|
||||
if ( $IN['SS_'.$key] != "" )
|
||||
{
|
||||
$start .= "\n".'$SUBJECT['."'$key'".'] = "'.str_replace( '"', """, stripslashes($HTTP_POST_VARS['SS_'.$key]) )."\";\n";
|
||||
}
|
||||
$start .= "\n".'$EMAIL['."'$key'".'] = <<<EOF'."\n".$text."\nEOF;\n";
|
||||
}
|
||||
}
|
||||
@@ -766,7 +803,7 @@ class ad_langs {
|
||||
|
||||
function do_form( $method='add', $id="" )
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
//+-------------------------------
|
||||
|
||||
@@ -926,7 +963,7 @@ class ad_langs {
|
||||
|
||||
function list_current()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
if ($INFO['default_language'] == "")
|
||||
{
|
||||
@@ -946,6 +983,8 @@ class ad_langs {
|
||||
$used_ids = array();
|
||||
$show_array = array();
|
||||
|
||||
$ADMIN->html .= $SKIN->js_checkdelete();
|
||||
|
||||
if ( $DB->get_num_rows() )
|
||||
{
|
||||
|
||||
@@ -980,7 +1019,7 @@ class ad_langs {
|
||||
"<center>{$r['mcount']}</center>",
|
||||
"<center><a href='".$SKIN->base_url."&act=lang&code=export&id={$r['lid']}'>Export</a></center>",
|
||||
"<center><a href='".$SKIN->base_url."&act=lang&code=edit&id={$r['lid']}'>Edit</a></center>",
|
||||
"<i>Deallocate before removing</i>",
|
||||
"<center><a href='javascript:checkdelete(\"act=lang&code=remove&id={$r['lid']}\")'>Remove</a></center>",
|
||||
) );
|
||||
|
||||
$used_ids[] = $r['lid'];
|
||||
@@ -1008,7 +1047,7 @@ class ad_langs {
|
||||
|
||||
$ADMIN->html .= $SKIN->start_table( "Current Unallocated Language Packs" );
|
||||
|
||||
$ADMIN->html .= $SKIN->js_checkdelete();
|
||||
|
||||
|
||||
while ( $r = $DB->fetch_row() )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user