コード例 #1
0
ファイル: edit.php プロジェクト: harrylongworth/tv-bb
     BB_RunPluginAction("post_bb_main_edit_site_opt_delete_translation_notification");
 } else {
     if ($_REQUEST["bb_action"] == "bb_main_edit_site_opt_view_translation_notifications") {
         BB_RunPluginAction("pre_bb_main_edit_site_opt_view_translation_notifications");
         require_once "translate.php";
         $rows = array();
         $urlbase = BB_GetRequestURLBase();
         foreach ($bb_translate_notify as $num => $entry) {
             if (!file_exists($entry[2] . "/" . $entry[3] . "_" . $entry[5] . "_page.php")) {
                 unset($bb_translate_notify[$num]);
             } else {
                 $rows[] = array(BB_FormatTimestamp($entry[1]), "<a href=\"" . $urlbase . "?bb_action=bb_main_edit&lang=" . urlencode($entry[4]) . "&notify=" . $num . "\" target=\"_blank\">" . htmlspecialchars(BB_Translate(BB_GetIANADesc($entry[4], true, true))) . "</a>", "<a href=\"" . $urlbase . "?bb_action=bb_main_edit&lang=" . urlencode($entry[5]) . "&notify=" . $num . "\" target=\"_blank\">" . htmlspecialchars(BB_Translate(BB_GetIANADesc($entry[5], true, true))) . "</a>", htmlspecialchars($entry[6]), BB_CreatePropertiesLink(BB_Translate("Delete"), "bb_main_edit_site_opt_delete_translation_notification", array("notify" => $num)));
             }
         }
         BB_RunPluginAction("bb_main_edit_site_opt_view_translation_notifications_active");
         BB_SaveTranslationNotifications();
         if (!count($rows)) {
             BB_PropertyFormLoadError("No notifications found.");
         }
         $options = array("title" => "View Notifications", "desc" => "View and manage translation notifications.", "fields" => array(array("type" => "table", "cols" => array("Timestamp", "Source", "Target", "Reason", "Options"), "rows" => $rows)));
         BB_RunPluginAction("bb_main_edit_site_opt_view_translation_notifications_options");
         BB_PropertyForm($options);
         BB_RunPluginAction("post_bb_main_edit_site_opt_view_translation_notifications");
     } else {
         if ($_REQUEST["bb_action"] == "bb_main_edit_site_opt_profile_submit") {
             BB_RunPluginAction("pre_bb_main_edit_site_opt_profile_submit");
             $pass = $_REQUEST["oldpass"];
             if ($pass != "") {
                 if ($bb_account["pass"] !== sha1($bb_account["user"] . ":" . $pass)) {
                     BB_PropertyFormError("'Current Password' is incorrect.");
                 }
コード例 #2
0
ファイル: bb_functions.php プロジェクト: harrylongworth/tv-bb
function BB_DeleteTranslationNotification($num)
{
    global $bb_translate_notify;
    BB_RunPluginActionInfo("pre_bb_deletetranslationnotification", $num);
    unset($bb_translate_notify[$num]);
    BB_RunPluginActionInfo("post_bb_deletetranslationnotification", $num);
    return BB_SaveTranslationNotifications();
}