コード例 #1
0
ファイル: index.php プロジェクト: bqq1986/efront
    if (isset($_GET['bypass_language']) && in_array($_GET['bypass_language'], array_keys($languages))) {
        $_SESSION['s_language'] = $_GET['bypass_language'];
    }
    //Keep persisted language across page calls
    if (isset($_SESSION['s_language'])) {
        $smarty->assign("T_LANGUAGE", $_SESSION['s_language']);
    } else {
        $smarty->assign("T_LANGUAGE", $GLOBALS['configuration']['default_language']);
    }
}
/*
 * Check if you should input the JS code to
 * trigger sending the next notificatoin emails
 * Since 3.6.0
 */
if (EfrontNotification::shouldSendNextNotifications()) {
    $smarty->assign("T_TRIGGER_NEXT_NOTIFICATIONS_SEND", 1);
    $_SESSION['send_next_notifications_now'] = 0;
    // the msg that triggered the immediate send should be sent now
}
//if there is cms page and no get parameter defined, redirect to the cms page
if ($configuration['cms_page'] != "" && sizeof($_GET) == 0 && file_exists(G_CURRENTTHEMEPATH . "external/" . $GLOBALS['configuration']['cms_page'] . ".php")) {
    //check also if file exists to prevent from broken link
    //eF_redirect("".G_RELATIVEADMINLINK.$GLOBALS['configuration']['cms_page'].".php");
    eF_redirect("" . G_SERVERNAME . G_CURRENTTHEMEURL . "external/" . $configuration['cms_page'] . ".php");
}
//The user logged out
if (isset($_GET['logout']) && !isset($_POST['submit_login'])) {
    //session_start();			//Isn't needed here if the head session_start() is in place
    if (isset($_SESSION['s_login']) && $_SESSION['s_login']) {
        try {
コード例 #2
0
ファイル: digests.php プロジェクト: kaseya-university/efront
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             } else {
                 $sending_queue_msgs[$key]['recipients'] = formatLogin($sending_queue_msgs[$key]['recipient']);
             }
         }
     }
     $smarty->assign("T_MESSAGE_QUEUE_SIZE", $sending_queue_size[0]['count']);
     // This is almost buggy - cannot filter according to recipients count - significant optimization however
     foreach ($sending_queue_msgs as $key => $message) {
         $notification = new EfrontNotification($message);
         if ($notification->notification['recipient'] == "") {
             $sending_queue_msgs[$key]['recipients_count'] = sizeof($notification->getRecipients());
         }
     }
     if (!empty($sending_queue_msgs)) {
         $smarty->assign("T_QUEUE_MSGS", $sending_queue_msgs);
     }
     $smarty->display('administrator.tpl');
     exit;
 }
 $notifications = EfrontNotification::getAllNotifications();
 $events_table = EfrontEvent::getEventTypes(false);
 if (sizeof($notifications) > 0) {
     try {
         foreach ($notifications as $key => $notification) {
コード例 #3
0
ファイル: send_notifications.php プロジェクト: bqq1986/efront
            $sent_messages = EfrontNotification::sendNextNotifications($GLOBALS['configuration']['notifications_messages_per_time']);
            EFrontConfiguration::setValue('notifications_lock', 0);
        } else {
            chdir($dir);
            echo "locked";
            exit;
        }
    }
}
//pr($sent_messages);
//debug(false);
if ($GLOBALS['configuration']['notifications_maximum_inter_time'] > 0) {
    EfrontConfiguration::setValue('notifications_last_send_timestamp', time());
}
if ($sent_messages) {
    EfrontNotification::clearSentMessages();
}
if ((!isset($hide_messages) || !$hide_messages) && !isset($_GET['ajax']) && basename($_SERVER['PHP_SELF']) != 'crontab_notifications.php') {
    if ($sent_messages) {
        $message = $sent_messages . " notification emails sent successfully";
        $message_type = "success";
    } else {
        $message = "No notification emails have been sent";
        $message_type = "failure";
    }
    eF_redirect($_SESSION['s_type'] . ".php?ctg=digests&message={$message}&message_type={$message_type}&tab=messages_queue");
} else {
    if (!isset($message)) {
        $message = '';
    }
    echo $message . "sent";
コード例 #4
0
 /**
  * Activate - deactivation functions
  */
 public static function activateEventNotification($event_notification_id)
 {
     eF_updateTableData("event_notifications", array("active" => 1), "id = '" . $event_notification_id . "'");
     $event_notification = eF_getTableData("event_notifications", "*", "id = " . $event_notification_id);
     EfrontNotification::initializeEventNotification($event_notification[0]);
 }
コード例 #5
0
         try {
             $result = eF_getTableData("paypal_configuration", "paypalbusiness");
             if (!empty($result)) {
                 EfrontConfiguration::setValue('paypalbusiness', $result[0]['paypalbusiness']);
             }
         } catch (Exception $e) {
         }
         //Reset certain version options
         try {
             if ($options['version_type'] == 'standard') {
                 EfrontConfiguration::setValue('version_type', 'community');
             }
         } catch (Exception $e) {
         }
         //Add default notifications to 3.5
         EfrontNotification::addDefaultNotifications();
     }
 }
 //Now upgrade to 3.6.12
 include "upgrade.php";
 Installation::createConfigurationFile($values, true);
 //the following lines remove some old editor files that prevent editor from loading in version 3.6
 $removedDir = array();
 $removedDir[] = G_ROOTPATH . 'www/editor/tiny_mce/plugins/zoom';
 $removedDir[] = G_ROOTPATH . 'www/editor/tiny_mce/plugins/flash';
 $removedDir[] = G_ROOTPATH . 'www/editor/tiny_mce/plugins/devkit';
 $removedDir[] = G_ROOTPATH . 'www/editor/tiny_mce/plugins/mathtype';
 $removedDir[] = G_ROOTPATH . 'www/editor/tiny_mce/plugins/lessons_info';
 foreach ($removedDir as $key => $value) {
     if (is_dir($value)) {
         try {