コード例 #1
0
ファイル: language.php プロジェクト: holandacz/nb4
 foreach ($languages as $langid => $lang) {
     $langoptions["{$lang['languageid']}"] = $lang['title'];
     if ($lang['languageid'] == $vbulletin->GPC['dolanguageid']) {
         $language = $lang;
     }
 }
 $phrasetypeoptions = array();
 $phrasetypes = fetch_phrasetypes_array();
 foreach ($phrasetypes as $fieldname => $type) {
     $phrasetypeoptions["{$fieldname}"] = $type['title'];
 }
 print_phrase_ref_popup_javascript();
 // get custom phrases
 $numcustom = 0;
 if ($vbulletin->GPC['dolanguageid'] != -1) {
     $custom_phrases = fetch_custom_phrases($vbulletin->GPC['dolanguageid'], $vbulletin->GPC['fieldname']);
     $numcustom = sizeof($custom_phrases);
 }
 // get inherited and customized phrases
 $standard_phrases = fetch_standard_phrases($vbulletin->GPC['dolanguageid'], $vbulletin->GPC['fieldname'], $numcustom);
 $numstandard = sizeof($standard_phrases);
 $totalphrases = $numcustom + $numstandard;
 $numpages = ceil($totalphrases / $perpage);
 if ($vbulletin->GPC['pagenumber'] < 1) {
     $vbulletin->GPC['pagenumber'] = 1;
 }
 if ($vbulletin->GPC['pagenumber'] > $numpages) {
     $vbulletin->GPC['pagenumber'] = $numpages;
 }
 $startat = ($vbulletin->GPC['pagenumber'] - 1) * $perpage;
 $endat = $startat + $perpage;
コード例 #2
0
ファイル: qhvbmailer.php プロジェクト: holandacz/nb4
|| #################################################################### ||
\*======================================================================*/
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
global $vbulletin;
require_once DIR . '/includes/qhvbmailer_functions.php';
require_once DIR . '/includes/adminfunctions_language.php';
require_once DIR . '/includes/charts/charts.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminsettings')) {
    print_cp_no_permission();
}
// ######################## GET PHRASES ###################################
$tps = fetch_custom_phrases(0, 'qhvbmailer_templates');
foreach ($tps as $tp) {
    $template_phrases[$tp['varname']] = $tp['text'];
}
//
if ($_GET['do'] == "manage_templates" && $_GET['act'] == 2 || $_GET['do'] == "manage_autosenders" && $_GET['act'] == 2 || $_GET['do'] == "manage_newsletters" && $_GET['act'] == 2) {
    ?>
	<script language="javascript" type="text/javascript" src="../includes/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
	<script language="javascript" type="text/javascript">
		tinyMCE.init({
			theme : "advanced",
			mode : "exact",
			elements : "elm1",
			extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style],a[href|target|name]",
			theme_advanced_buttons2_add_before : "fontselect,fontsizeselect",
			debug : false