Ejemplo n.º 1
0
    }
    #cpp#endif
    $browser = detectBrowser();
    if ($browser == 'ie6') {
        define("MSIE_BROWSER", 1);
        $browser = 'IE6';
        //For compatibility reasons, since it used to set it explicitly to IE6 or IE7
    } elseif ($browser == 'ie') {
        define("MSIE_BROWSER", 1);
        $browser = 'IE7';
    } else {
        define("MSIE_BROWSER", 0);
    }
    $smarty->assign("T_BROWSER", $browser);
    $smarty->assign("T_VERSION_TYPE", $GLOBALS['versionTypes'][G_VERSIONTYPE]);
    $smarty->assign("T_DATE_FORMATGENERAL", eF_dateFormat(false));
}
// eFront social activation codes
//define("SOCIAL_FUNC_EVENTS", 1);
//define("SOCIAL_FUNC_SYSTEM_TIMELINES", 2);
//define("SOCIAL_FUNC_LESSON_TIMELINES", 4);
//define("SOCIAL_FUNC_PEOPLE", 8);
//define("SOCIAL_FUNC_COMMENTS", 16);
//define("SOCIAL_FUNC_USERSTATUS", 32);
define("FB_FUNC_DATA_ACQUISITION", 64);
define("FB_FUNC_LOGGING", 128);
define("FB_FUNC_CONNECT", 256);
//define("SOCIAL_FUNC_LESSON_PEOPLE", 64);
define("SOCIAL_MODULES_ALL", 9);
// number of social module options
$MODULE_HCD_EVENTS['HIRED'] = 1;
Ejemplo n.º 2
0
         if ($event_type["afterEvent"]) {
             $events_after[$key . "_" . $event_type['category']] = $event_type['text'];
             if ($event_type['canBeNegated']) {
                 $events_after["-" . $key . "_" . $event_type['category']] = $event_type['canBeNegated'];
             }
         }
         if ($event_type['canBePreceded']) {
             $events_before["-" . $key . "_" . $event_type['category']] = $event_type['text'];
         }
     }
 }
 $form->addElement('select', 'event_types', _EVENT, $events, "id = 'event_types'  class = 'inputSelectMed'  onChange = 'changeEventCategory(this)'");
 $form->addElement('select', 'event_types_after', NULL, $events_after, "id = 'event_types_after'  class = 'inputSelectMed'  onChange = 'changeEventCategory(this)'");
 $form->addElement('select', 'event_types_before', NULL, $events_before, "id = 'event_types_before'  class = 'inputSelectMed'  onChange = 'changeEventCategory(this)'");
 // Create the date select
 $formatDate = eF_dateFormat();
 $options = array('format' => $formatDate . ', H:i', 'minYear' => date("Y"), 'maxYear' => date('Y') + 1, 'id' => "dateSelects");
 $form->addElement('date', 'timestamp', _ON, $options);
 // Create the inteval select: 1 day, 3 days, 1 week, 1 month
 $day_seconds = 86400;
 $month_seconds = 30 * 86400;
 $durations = array($day_seconds / 4 => "6 " . _HOURS, $day_seconds / 2 => "12 " . _HOURS, $day_seconds => "1 " . _DAYLOWER);
 for ($i = 2; $i <= 60; $i++) {
     $day_seconds += 86400;
     $durations[$day_seconds] = $i . " " . _DAYS;
 }
 for ($k = 3; $k <= 12; $k++) {
     $durations[$k * $month_seconds] = $k . " " . _MONTHS;
 }
 $form->addElement('select', 'send_interval', _EVERY, $durations, "id = 'message_interval' class = 'inputSelectMed' ");
 // Create the templates values - the exact same fields should be used during substitution in the eF_formulateTemplateMessage function
Ejemplo n.º 3
0
 /**
  * (non-PHPdoc)
  * @see libraries/EfrontEntity#getForm($form)
  */
 public function getForm($form)
 {
     $form->addElement('text', 'poll_subject', _SUBJECT, 'class = "inputText"');
     $form->addRule('poll_subject', _THEFIELD . ' "' . _TITLE . '" ' . _ISMANDATORY, 'required', null, 'client');
     $form->addElement('textarea', 'poll_text', _QUESTIONTEXT, 'class = "inputTextarea simpleEditor"');
     $formatDate = eF_dateFormat();
     $options = array('format' => $formatDate, 'minYear' => date("Y"), 'maxYear' => date('Y') + 2);
     $form->addElement('date', 'from', null, $options);
     $form->addElement('date', 'to', null, $options);
     $form->setDefaults(array('from' => time(), 'to' => time() + 30 * 86400));
     //1 month forward
     $form->addElement('text', 'options[0]', _INSERTMULTIPLEQUESTIONS, 'class = "inputText inputText_QuestionChoice"');
     $form->addRule('options[0]', _THEFIELD . ' "' . _INSERTMULTIPLEQUESTIONS . '" ' . _ISMANDATORY, 'required', null, 'client');
     $form->addElement('text', 'options[1]', '', 'class = "inputText inputText_QuestionChoice"');
     $form->addRule('options[1]', _THEFIELD . ' "' . _INSERTMULTIPLEQUESTIONS . '" ' . _ISMANDATORY, 'required', null, 'client');
     $form->addElement('submit', 'submit_add_poll', _SUBMIT, 'class = "flatButton"');
     $form->setDefaults(array('poll_subject' => $this->{$this->entity}['title'], 'poll_text' => $this->{$this->entity}['question']));
     $values['options'] = array_values(unserialize($this->{$this->entity}['options']));
     //We put array_values to make sure that the array starts from zero
     foreach ($values['options'] as $key => $value) {
         if ($key > 2) {
             $form->addElement('text', 'options[' . $key . ']', null, 'class = "inputText inputText_QuestionChoice"');
             $form->addRule('options[' . $key . ']', _THEFIELD . ' ' . _ISMANDATORY, 'required', null, 'client');
         }
         $form->setDefaults(array('options[' . $key . ']' => htmlspecialchars_decode($value, ENT_QUOTES)));
     }
     return $form;
 }