52 lines
1.8 KiB
PHP
52 lines
1.8 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
chdir('..');
|
||
|
|
include('admin_header.php');
|
||
|
|
|
||
|
|
/*
|
||
|
|
* Just blasts through a list of language phrase IDs to make sure all the sandbox DBs
|
||
|
|
* (and production) are coordinated. If you want to add your own phrase, copy and paste
|
||
|
|
* one of these array-key lines onto the end of the list, edit it to include your new ID and
|
||
|
|
* phrase text/name, and hit (sandbox).communityfoc.us/admin/scripts/langhack.php in
|
||
|
|
* your browser. You should now be able to use that phrase in templates (eg
|
||
|
|
* {lang_print id=9000000} for "Dating Without Borders") and change it in the admin-panel
|
||
|
|
* phrase editor.
|
||
|
|
*/
|
||
|
|
|
||
|
|
$phrases = array();
|
||
|
|
$phrases[9000000] = "Only Paid Members have access to video";
|
||
|
|
$phrases[9000001] = "To view video content, <a href=\"/ccbill/\">click here</a> to upgrade your membership.";
|
||
|
|
$phrases[9000002] = "Approve";
|
||
|
|
$phrases[9000003] = "Un-Approve";
|
||
|
|
$phrases[9000004] = "View Members";
|
||
|
|
$phrases[9000005] = "Register for Bateworld";
|
||
|
|
$phrases[9000006] = "Only members can view the site. Registration is free! <a href=\"/signup.php\">Click here.</a>";
|
||
|
|
$phrases[9000007] = "What's Hot";
|
||
|
|
$phrases[9000008] = "Get Full Membership";
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$maxphraseid = max(array_keys($phrases));
|
||
|
|
|
||
|
|
for ($i = 9000000; $i <= $maxphraseid; $i++) {
|
||
|
|
|
||
|
|
$extant_query = $database->database_query("SELECT * FROM se_languagevars WHERE languagevar_id=$i");
|
||
|
|
|
||
|
|
if ($database->database_num_rows($extant_query)) {
|
||
|
|
|
||
|
|
echo "$i already exists.<br />\n";
|
||
|
|
}
|
||
|
|
|
||
|
|
else {
|
||
|
|
|
||
|
|
echo "adding... ";
|
||
|
|
$phrase_insert = $database->database_query("INSERT INTO se_languagevars (languagevar_id, languagevar_language_id, languagevar_value, languagevar_default) VALUES($i, 1, '".$database->database_real_escape_string($phrases[$i])."', NULL)");
|
||
|
|
echo "added ".$phrases[$i]." as $i.<br />\n";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
include('admin_footer.php');
|
||
|
|
|
||
|
|
?>
|