Beispiel #1
0
 /**
  * Creates a new overview event.
  * 
  * @param	int		ovent type id
  * @param	int		time
  * @param	mixed	event id (may be null)
  * @param	int		relational id
  * @param	array	additional fields
  * @param	bool	checked
  * @param	mixed	data
  * @return	Ovent
  */
 public static function create($oventTypeID, $time, $eventID, $relationalID, $additionalFields = array(), $checked = 0, $data = array())
 {
     if (!is_array($data)) {
         $data = array($data);
     }
     $oventID = self::insert($oventTypeID, $time, $eventID, $relationalID, $additionalFields, $checked, $data);
     $oventObj = Ovent::getByOventID($oventID);
     if (isset($additionalFields['userID']) && UserSettings::getSetting($additionalFields['userID'], 'hideOventType' . $oventTypeID)) {
         $oventObj->getEditor()->check();
     }
     return $oventObj;
 }
/**COPYRIGHTS**/
/**
 * OfflineContacts post configuration
 * Here we update the Tabs
 * If google gear is turn on we link the Contacts tab 
 * to the ggears_contacts.
 *
 * @package OfflineContacts
 * @author Philippe Lewicki <*****@*****.**>
 * @license ##License##
 * @version 0.1
 * @date 2010-09-04  
 */
if (isset($_SESSION['do_User'])) {
    $user_settings = new UserSettings();
    if ($user_settings->getSetting("google_gears") == "Yes") {
        if ($GLOBALS['cfg_tab_placement']->count() > 0) {
            $new_tabs = new ArrayIterator();
            $GLOBALS['cfg_tab_placement']->rewind();
            while ($GLOBALS['cfg_tab_placement']->valid()) {
                $tab = $GLOBALS['cfg_tab_placement']->current();
                if ($tab->getTabName() == _('Contacts')) {
                    // uncomment the setPlugInName to link to the plugIn Folder.
                    $tab->setPlugInName("OfflineContacts");
                    $tab->setTabName("Contacts Offline")->setPages(array("ggears_contacts"))->setDefaultPage("ggears_contacts");
                }
                $GLOBALS['cfg_tab_placement']->next();
            }
        }
    }
}
Beispiel #3
0
?>
</div>
        <div class="banner50 pad020 text16 fuscia_text"><?php 
echo _('Google Gears Setup');
?>
</div>
        <div class="contentfull">
        <?php 
$UserSettings = new UserSettings();
$e_set_ggear = new Event("UserSettings->eventSetSetting");
$e_set_ggear->addParam("goto", $_SERVER['PHP_SELF']);
$e_set_ggear->addParam("setting_name", "google_gears");
echo '<div class="messageshadow">';
echo '<div class="messages">';
$msg = new Message();
if ($UserSettings->getSetting("google_gears") == 'Yes') {
    echo $msg->getMessage('google_gears');
    echo '<br />';
    $e_set_ggear->addParam("setting_value", "No");
    echo $e_set_ggear->getLink(_('Turn Off'));
} else {
    echo $msg->getMessage('google_gears');
    echo '<br />';
    $e_set_ggear->addParam("setting_value", "Yes");
    echo $e_set_ggear->getLink(_('Turn On'));
}
echo '</div></div>';
echo '<br />';
?>
        </div>
        <div class="solidline"></div>