Files
Testing/bwadmin/admin_video_approve.php

42 lines
1.5 KiB
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?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.";
$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');
?>