本文整理汇总了PHP中user_config_option函数的典型用法代码示例。如果您正苦于以下问题:PHP user_config_option函数的具体用法?PHP user_config_option怎么用?PHP user_config_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了user_config_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadPanels
private function loadPanels($options)
{
if (!$this->panels) {
$contact_pg_ids = ContactPermissionGroups::getPermissionGroupIdsByContactCSV(logged_user()->getId(), false);
$this->panels = array();
$sql = "\r\n\t\t\t\tSELECT * FROM " . TABLE_PREFIX . "tab_panels \r\n\t\t\t\tWHERE \r\n\t\t\t\t\tenabled = 1 AND\t\t\t\t\t\r\n\t\t\t\t\t( \t\r\n\t\t\t\t\t\tplugin_id IS NULL OR plugin_id=0 OR\r\n\t\t\t\t\t\tplugin_id IN (SELECT id FROM " . TABLE_PREFIX . "plugins WHERE is_installed = 1 AND is_activated = 1) \r\n\t\t\t\t\t)\r\n\t\t\t\t\tAND id IN (SELECT tab_panel_id FROM " . TABLE_PREFIX . "tab_panel_permissions WHERE permission_group_id IN ({$contact_pg_ids}))\r\n\t\t\t\tORDER BY ordering ASC ";
$res = DB::execute($sql);
while ($row = $res->fetchRow()) {
$object = array("title" => lang($row['title']), "id" => $row['id'], "quickAddTitle" => lang($row['default_controller']), "refreshOnWorkspaceChange" => (bool) $row['refresh_on_context_change'], "defaultController" => $row['default_controller'], "defaultContent" => array("type" => "url", "data" => get_url($row['default_controller'], $row['default_action'])), "enabled" => $row['enabled'], "type" => $row['type'], "tabTip" => lang($row['title']));
if (config_option('show_tab_icons')) {
$object["iconCls"] = $row['icon_cls'];
}
if ($row['initial_controller'] && $row['initial_action']) {
$object["initialContent"] = array("type" => "url", "data" => get_url($row['initial_controller'], $row['initial_action']));
}
if ($row['id'] == 'more-panel' && config_option('getting_started_step') >= 99) {
$object['closable'] = true;
if (!user_config_option('settings_closed')) {
$this->panels[] = $object;
}
} else {
$this->panels[] = $object;
}
}
}
return $this->panels;
}
示例2: mail_do_mark_as_read_unread_objects
function mail_do_mark_as_read_unread_objects($ids_to_mark, $read)
{
$all_accounts = array();
$all_accounts_ids = array();
foreach ($ids_to_mark as $id) {
$obj = Objects::findObject($id);
if ($obj instanceof MailContent && logged_user() instanceof Contact) {
//conversation set the rest of the conversation
$uds_to_mark_from_conver = array();
if (user_config_option('show_emails_as_conversations')) {
$emails_in_conversation = MailContents::getMailsFromConversation($obj);
foreach ($emails_in_conversation as $email) {
//$id is marked on object controller only mark the rest of the conversation
if ($id != $email->getId()) {
$email->setIsRead(logged_user()->getId(), $read);
$uds_to_mark_from_conver[] = $email->getUid();
}
}
}
//make the array with accounts and uids to send to the mail server
//accounts
if (!in_array($obj->getAccountId(), $all_accounts_ids)) {
$account = $obj->getAccount();
//if logged user is owner of this account and is imap
if ($account instanceof MailAccount && $account->getContactId() == logged_user()->getId() && $account->getIsImap()) {
$all_accounts_ids[] = $obj->getAccountId();
$all_accounts[$account->getId()]['account'] = $account;
}
}
//uids
if (in_array($obj->getAccountId(), $all_accounts_ids)) {
//add conversations uids
//mientras ande mal el uid de los mails enviados si estan sincronizados no usar esta parte
/*if (user_config_option('show_emails_as_conversations')) {
foreach ($uds_to_mark_from_conver as $uid_conver){
$all_accounts[$obj->getAccountId()]['uids'][] = $uid_conver;
}
}*/
$all_accounts[$obj->getAccountId()]['folders'][$obj->getImapFolderName()][] = $obj->getUid();
}
}
}
//foreach account send uids by folder to mark in the mail server
foreach ($all_accounts as $account_data) {
$account = $account_data['account'];
$folders = $account_data['folders'];
foreach ($folders as $key => $folder) {
$folder_name = $key;
$uids = $folder;
if (!empty($folder_name)) {
try {
MailUtilities::setReadUnreadImapMails($account, $folder_name, $uids, $read);
} catch (Exception $e) {
Logger::log("Could not set mail as read on mail server, exception:\n" . $e->getMessage());
}
}
}
}
}
示例3: search
/**
* Execute search
*
* @param void
* @return null
*/
function search()
{
if (active_project() && !logged_user()->isProjectUser(active_project())) {
flash_error(lang('no access permissions'));
ajx_current("empty");
return;
}
// if
$pageType = array_var($_GET, 'page_type');
$search_for = array_var($_GET, 'search_for');
$objectManagers = array("ProjectWebpages", "ProjectMessages", "MailContents", "ProjectFiles", "ProjectMilestones", "ProjectTasks", "ProjectEvents");
$objectTypes = array(lang('webpages'), lang('messages'), lang('emails'), lang('files'), lang('milestones'), lang('tasks'), lang('events'));
$iconTypes = array('webpage', 'message', 'email', 'file', 'milestone', 'task', 'event');
if (user_config_option('show_file_revisions_search')) {
array_splice($objectManagers, 4, 0, 'ProjectFileRevisions');
array_splice($objectTypes, 4, 0, lang('file contents'));
array_splice($iconTypes, 4, 0, 'file');
}
$search_results = array();
$timeBegin = microtime(true);
if (trim($search_for) == '') {
$search_results = null;
$pagination = null;
} else {
$search_results = $this->searchWorkspaces($search_for, $search_results, 5);
$search_results = $this->searchUsers($search_for, $search_results, 5);
$search_results = $this->searchContacts($search_for, $search_results, 5);
if (array_var($_GET, 'search_all_projects') != "true" && active_project() instanceof Project) {
$projects = active_project()->getAllSubWorkspacesCSV(true);
} else {
$projects = null;
}
$c = 0;
foreach ($objectManagers as $om) {
$user_id = $om == "MailContents" ? logged_user()->getId() : 0;
$results = SearchableObjects::searchByType($search_for, $projects, $om, true, 5, 1, null, $user_id);
if (count($results[0]) > 0) {
$sr = array();
$sr['result'] = $results[0];
$sr['pagination'] = $results[1];
$sr['type'] = $objectTypes[$c];
$sr['icontype'] = $iconTypes[$c];
$sr['manager'] = $om;
$search_results[] = $sr;
}
$c++;
}
}
// if
$timeEnd = microtime(true);
if (str_starts_with($search_for, '"') && str_ends_with($search_for, '"')) {
$search_for = str_replace('"', '', $search_for);
}
tpl_assign('search_string', $search_for);
tpl_assign('search_results', $search_results);
tpl_assign('time', $timeEnd - $timeBegin);
ajx_set_no_toolbar(true);
ajx_replace(true);
}
示例4: getEventLimits
function getEventLimits($event, $date, &$event_start, &$event_duration, &$end_modified)
{
$end_modified = false;
if ($event instanceof ProjectEvent) {
$event_start = new DateTimeValue($event->getStart()->getTimestamp() + 3600 * logged_user()->getTimezone());
$event_duration = new DateTimeValue($event->getDuration()->getTimestamp() + 3600 * logged_user()->getTimezone());
} else {
if ($event instanceof ProjectTask) {
/* @var $event ProjectTask */
$work_day_start = new DateTimeValue($date->getTimestamp());
$wsd = user_config_option('work_day_start_time');
$work_day_start->setHour(substr($wsd, 0, strpos($wsd, ':')));
$work_day_start->setMinute(substr($wsd, strpos($wsd, ':') + 1));
if ($event->getStartDate() instanceof DateTimeValue) {
$event_start = new DateTimeValue($event->getStartDate()->getTimestamp() + 3600 * logged_user()->getTimezone());
} else {
if ($event->getTimeEstimate() > 0 && $event->getDueDate() instanceof DateTimeValue) {
$event_start = new DateTimeValue($event->getDueDate()->getTimestamp() + 3600 * logged_user()->getTimezone());
$event_start->advance($event->getTimeEstimate() * -60);
} else {
$event_start = $work_day_start;
}
}
$work_day_end = new DateTimeValue($date->getTimestamp());
$wed = user_config_option('work_day_end_time');
$work_day_end->setHour(substr($wed, 0, strpos($wed, ':')));
$work_day_end->setMinute(substr($wed, strpos($wed, ':') + 1));
if ($event->getDueDate() instanceof DateTimeValue) {
$event_duration = new DateTimeValue($event->getDueDate()->getTimestamp() + 3600 * logged_user()->getTimezone());
} else {
if ($event->getTimeEstimate() > 0 && $event->getStartDate() instanceof DateTimeValue) {
$event_duration = new DateTimeValue($event_start->getTimestamp());
$event_duration->advance($event->getTimeEstimate() * 60);
} else {
$event_duration = $work_day_end;
}
}
}
}
$tomorrow = new DateTimeValue($date->getTimestamp());
$tomorrow->add('d', 1);
if ($event_duration->getTimestamp() > $tomorrow->getTimestamp()) {
$event_duration = new DateTimeValue($tomorrow->getTimestamp());
$end_modified = true;
}
if ($event_start->getTimestamp() < $date->getTimestamp()) {
if (!$event->isRepetitive()) {
$event_start = new DateTimeValue($date->getTimestamp());
} else {
$event_start->setDay($date->getDay());
$event_start->setMonth($date->getMonth());
$event_start->setYear($date->getYear());
}
}
}
示例5: help_options
function help_options()
{
$show_context_help = user_config_option('show_context_help', 'until_close', logged_user()->getId());
$show = true;
if ($show_context_help == 'never') {
$show = false;
}
tpl_assign('show_help', $show);
ajx_set_panel('help');
ajx_replace(true);
}
示例6: get_context
/**
* Gets all the dimensions that user can see plus those wich must be displayed in the panels
*
*/
function get_context(){
ajx_current("empty");
// User config root dimensions
$dids = explode ("," ,user_config_option('root_dimensions', null, logged_user()->getId() ));
foreach ($dids as $id) {
if (is_numeric($id) && $id > 0 ) {
$user_root_dimensions[$id] = true ;
}
}
//All dimensions
$all_dimensions = Dimensions::findAll(array('order'=>'default_order ASC , id ASC'));
$dimensions_to_show = array();
$contact_pg_ids = ContactPermissionGroups::getPermissionGroupIdsByContactCSV(logged_user()->getId(),false);
foreach ($all_dimensions as $dim){
$did = $dim->getId();
if (isset($user_root_dimensions) && count($user_root_dimensions)) {
if ( isset($user_root_dimensions[$did]) && $user_root_dimensions[$did] ){
$dim->setIsRoot(true);
}else{
$dim->setIsRoot(false);
}
}
$added=false;
if (!$dim->getDefinesPermissions()){
$dimensions_to_show ['dimensions'][] = $dim;
$added = true;
}
else{
/*if dimension does not deny everything for each contact's PG, show it*/
if (!$dim->deniesAllForContact($contact_pg_ids)){
$dimensions_to_show ['dimensions'][] = $dim;
$added = true;
}
}
if ($dim->getIsRoot()&& $added){
$dimensions_to_show ['is_root'][] = true;
}
}
return $dimensions_to_show;
}
示例7: getEmails
/**
* Returns a list of emails according to the requested parameters
*
* @param string $tag
* @param array $attributes
* @param Project $project
* @return array
*/
function getEmails($account_id = null, $state = null, $read_filter = "", $classif_filter = "", $context = null, $start = null, $limit = null, $order_by = 'received_date', $dir = 'ASC', $join_params = null, $archived = false, $conversation_list = null, $only_count_result = false)
{
$mailTablePrefix = "e";
if (!$limit) {
$limit = user_config_option('mails_per_page') ? user_config_option('mails_per_page') : config_option('files_per_page');
}
$accountConditions = "";
// Check for accounts
$accountConditions = '';
if (isset($account_id) && $account_id > 0) {
//Single account
$accountConditions = " AND {$mailTablePrefix}.account_id = " . DB::escape($account_id);
} else {
// show mails for all visible accounts and classified mails where logged_user has permissions so we don't filter by account_id
/*// show emails from other accounts
$macs = MailAccountContacts::instance()->getByContact(logged_user());
$acc_ids = array(0);
foreach ($macs as $mac) $acc_ids[] = $mac->getAccountId();
// permission conditions
$pgs = ContactPermissionGroups::getPermissionGroupIdsByContactCSV(logged_user()->getId());
if (trim($pgs == '')) $pgs = '0';
$perm_sql = "(SELECT count(*) FROM ".TABLE_PREFIX."sharing_table st WHERE st.object_id = $mailTablePrefix.object_id AND st.group_id IN ($pgs)) > 0";
// show mails for all visible accounts and classified mails where logged_user has permissions
$accountConditions = " AND ($mailTablePrefix.account_id IN (" . implode(",", $acc_ids) . ") OR $perm_sql)";*/
}
// Check for unclassified emails
$classified = '';
if ($classif_filter != '' && $classif_filter != 'all') {
$persons_dim = Dimensions::findByCode('feng_persons');
$persons_dim_id = $persons_dim instanceof Dimension ? $persons_dim->getId() : "0";
$classified = "AND " . ($classif_filter == 'unclassified' ? "NOT " : "");
$classified .= "o.id IN (SELECT om.object_id FROM " . TABLE_PREFIX . "object_members om INNER JOIN " . TABLE_PREFIX . "members m ON m.id=om.member_id WHERE m.dimension_id<>{$persons_dim_id})";
}
// if not filtering by account or classification then check that emails are classified or from one of my accounts
if ($classified == '' && $accountConditions == '') {
$macs = MailAccountContacts::instance()->getByContact(logged_user());
$acc_ids = array(0);
foreach ($macs as $mac) {
$acc_ids[] = $mac->getAccountId();
}
$accountConditions = " AND ({$mailTablePrefix}.account_id IN (" . implode(',', $acc_ids) . ") OR EXISTS (\r\n\t\t\t\t\tSELECT om1.object_id FROM " . TABLE_PREFIX . "object_members om1 \r\n\t\t\t\t\t\tINNER JOIN " . TABLE_PREFIX . "members m1 ON m1.id=om1.member_id \r\n\t\t\t\t\t\tINNER JOIN " . TABLE_PREFIX . "dimensions d1 ON d1.id=m1.dimension_id \r\n\t\t\t\t\tWHERE om1.object_id={$mailTablePrefix}.object_id AND d1.is_manageable=1) ) ";
}
// Check for draft, junk, etc. emails
if ($state == "draft") {
$stateConditions = " {$mailTablePrefix}.state = '2'";
} else {
if ($state == "sent") {
$stateConditions = " {$mailTablePrefix}.state IN ('1','3','5')";
} else {
if ($state == "received") {
$stateConditions = " {$mailTablePrefix}.state IN ('0','5')";
} else {
if ($state == "junk") {
$stateConditions = " {$mailTablePrefix}.state = '4'";
} else {
if ($state == "outbox") {
$stateConditions = " {$mailTablePrefix}.state >= 200";
} else {
$stateConditions = "";
}
}
}
}
}
// Check read emails
if ($read_filter != "" && $read_filter != "all") {
if ($read_filter == "unread") {
$read = "AND NOT ";
$subread = "AND NOT mc.";
} else {
$read = "AND ";
$subread = "AND mc.";
}
$read2 = "id IN (SELECT rel_object_id FROM " . TABLE_PREFIX . "read_objects t WHERE contact_id = " . logged_user()->getId() . " AND id = t.rel_object_id AND t.is_read = '1')";
$read .= $read2;
$subread .= $read2;
} else {
$read = "";
$subread = "";
}
$conversation_cond = "";
$box_cond = "AND {$stateConditions}";
if (isset($conversation_list) && $conversation_list > 0) {
$conversation_cond = "AND e.conversation_last = 1";
}
$extra_conditions = "{$accountConditions} {$classified} {$read} {$conversation_cond} {$box_cond}";
Hook::fire("listing_extra_conditions", null, $extra_conditions);
return self::instance()->listing(array('limit' => $limit, 'start' => $start, 'order' => $order_by, 'order_dir' => $dir, 'extra_conditions' => $extra_conditions, 'count_results' => false, 'only_count_results' => $only_count_result, 'join_params' => $join_params));
}
示例8: fopen
fclose($handle);
}
// CONTENT NO QUOTED NO IMAGES
$html_no_quoted_no_images = MailUtilities::replaceQuotedBlocks($html_no_images, '<div style="color: #777;font-style:italic;padding: 5px 20px"><'.lang('hidden quoted text').'></div>');
$tmppath = ROOT.'/tmp/iq_'.$tmpfile;
$handle = fopen($tmppath, 'wb');
if ($handle) {
fwrite($handle, $html_no_quoted_no_images);
fclose($handle);
}
// VIEW CONTENT (iframe and links)
$remove_images = false;
$remove_quoted = false;
if (user_config_option('block_email_images') && html_has_images($html_content)) {
$remove_images = true;
}
if ($hide_quoted_text_in_emails && MailUtilities::hasQuotedBlocks($html_content)) {
$remove_quoted = true;
}
$pre = $email->getAccountId() . '_' . logged_user()->getId() . '_' . $email->getId();
$user_token = defined('SANDBOX_URL') ? logged_user()->getTwistedToken() : '';
$content = "";
if ($remove_images) {
$content = '<div id="'.$genid.'showImagesLink" style="background-color:#FFFFCC">'.lang('images are blocked').'
<a href="#" onclick="og.showMailImages(\''.$pre.'\', \''.gen_id().'\', \''.$genid.'\', \''.$user_token.'\');" style="text-decoration: underline;">'.lang('show images').'</a>
</div>';
}
if ($remove_images && $remove_quoted) {
$tpre = "iq_" . $pre;
示例9: lang
echo lang('auto detect user timezone');
?>
</span>
<div id ="<?php
echo $genid;
?>
detectTimeZone">
<?php
echo yes_no_widget('user[autodetect_time_zone]', 'userFormAutoDetectTimezone', user_config_option('autodetect_time_zone', null, $user->getId()), lang('yes'), lang('no'), null, array('onclick' => "og.showSelectTimezone('{$genid}')"));
?>
</div>
<div id="<?php
echo $genid;
?>
selecttzdiv" <?php
if (user_config_option('autodetect_time_zone', null, $user->getId())) {
echo 'style="display:none"';
}
?>
>
<?php
echo select_timezone_widget('user[timezone]', array_var($user_data, 'timezone'), array('id' => 'userFormTimezone', 'class' => 'long', 'tabindex' => '600'));
?>
</div>
<script type="text/javascript">
og.showSelectTimezone = function(genid) {
check = document.getElementById("userFormAutoDetectTimezoneYes");
div = document.getElementById(genid + "selecttzdiv");
if (check.checked){
示例10: user_config_option
<td id="ie_scrollbar_adjust" style="width:0px;"></td>
</tr>
</table>
</div><!--calowner -->
</div><!--gridcontainer -->
</div>
</td>
</tr>
</table>
</td>
</tr></table>
</div>
</div>
<?php
$wdst = user_config_option('work_day_start_time');
$h_m = explode(':', $wdst);
if (str_ends_with($wdst, 'PM')) {
$h_m[0] = ($h_m[0] + 12) % 24;
$h_m[1] = substr($h_m[1], 0, strpos(' ', $h_m[1]));
}
$defaultScrollTo = PX_HEIGHT * ($h_m[0] + $h_m[1] / 60);
?>
<script>
// Top Toolbar
ogCalendarUserPreferences = Ext.util.JSON.decode(document.getElementById('hfCalUserPreferences').value);
var ogCalTT = new og.CalendarTopToolbar({
renderTo:'calendarPanelTopToolbar'
});
var ogCalSecTT = new og.CalendarSecondTopToolbar({
示例11: user_config_option
scripts: true
});
}, wsch);
</script>
<?php
if ($object->isNew() || $object->canLinkObject(logged_user(), $project)) {
?>
<div style="display:none" id="<?php
echo $genid;
?>
add_linked_objects_div">
<fieldset>
<?php
$show_help_option = user_config_option('show_context_help');
if ($show_help_option == 'always' || $show_help_option == 'until_close' && user_config_option('show_add_note_linked_object_context_help', true, logged_user()->getId())) {
?>
<div id="addNotesPanelContextHelp" class="contextHelpStyle">
<?php
render_context_help($this, 'chelp add note linked objects', 'add_note_linked_object');
?>
</div>
<?php
}
?>
<legend><?php
echo lang('linked objects');
?>
</legend>
<?php
echo render_object_link_form($object);
示例12: getEmails
/**
* Returns a list of emails according to the requested parameters
*
* @param string $tag
* @param array $attributes
* @param Project $project
* @return array
*/
function getEmails($account_id = null, $state = null, $read_filter = "", $classif_filter = "", $context = null, $start = null, $limit = null, $order_by = 'received_date', $dir = 'ASC', $join_params = null, $archived = false) {
$mailTablePrefix = "e";
if (!$limit) $limit = user_config_option('mails_per_page') ? user_config_option('mails_per_page') : config_option('files_per_page');
$accountConditions = "";
// Check for accounts
$accountConditions = '';
if (isset($account_id) && $account_id > 0) { //Single account
$accountConditions = " AND $mailTablePrefix.account_id = " . DB::escape($account_id);
} else {
// show emails from other accounts
$macs = MailAccountContacts::instance()->getByContact(logged_user());
$acc_ids = array(0);
foreach ($macs as $mac) $acc_ids[] = $mac->getAccountId();
// permission conditions
$pgs = ContactPermissionGroups::getPermissionGroupIdsByContactCSV(logged_user()->getId());
if (trim($pgs == '')) $pgs = '0';
$perm_sql = "(SELECT count(*) FROM ".TABLE_PREFIX."sharing_table st WHERE st.object_id = $mailTablePrefix.object_id AND st.group_id IN ($pgs)) > 0";
// show mails for all visible accounts and classified mails where logged_user has permissions
$accountConditions = " AND ($mailTablePrefix.account_id IN (" . implode(",", $acc_ids) . ") OR $perm_sql)";
}
// Check for unclassified emails
$classified = '';
if ($classif_filter != '' && $classif_filter != 'all') {
$classified = "AND " . ($classif_filter == 'unclassified' ? "NOT " : "");
$classified .= "o.id IN (SELECT object_id FROM ".TABLE_PREFIX."object_members)";
}
// Check for draft, junk, etc. emails
if ($state == "draft") {
$stateConditions = " $mailTablePrefix.state = '2'";
} else if ($state == "sent") {
$stateConditions = " $mailTablePrefix.state IN ('1','3','5')";
} else if ($state == "received") {
$stateConditions = " $mailTablePrefix.state IN ('0','5')";
} else if ($state == "junk") {
$stateConditions = " $mailTablePrefix.state = '4'";
} else if ($state == "outbox") {
$stateConditions = " $mailTablePrefix.state >= 200";
} else {
$stateConditions = "";
}
// Check read emails
if ($read_filter != "" && $read_filter != "all") {
if ($read_filter == "unread") {
$read = "AND NOT ";
$subread = "AND NOT mc.";
} else {
$read = "AND ";
$subread = "AND mc.";
}
$read2 = "id IN (SELECT rel_object_id FROM " . TABLE_PREFIX . "read_objects t WHERE contact_id = " . logged_user()->getId() . " AND t.is_read = '1')";
$read .= $read2;
$subread .= $read2;
} else {
$read = "";
$subread = "";
}
// Conversations not allowed yet
//if (user_config_option('show_emails_as_conversations')) {
// $state_conv_cond_1 = $state != 'received' ? " $stateConditions AND " : " m.state <> '2' AND ";
// $state_conv_cond_2 = $state != 'received' ? " AND (mc.state = '1' OR mc.state = '3' OR mc.state = '5') " : " AND mc.state <> '2' ";
// $archived_by_id = $archived ? "AND o.archived_by_id != 0" : "AND o.archived_by_id = 0";
// $trashed_by_id = "AND o.trashed_by_id = 0";
// $conversation_cond = "AND IF(m.conversation_id = 0, $stateConditions, $state_conv_cond_1 NOT EXISTS (SELECT * FROM ".TABLE_PREFIX."mail_contents mc WHERE m.conversation_id = mc.conversation_id AND m.account_id = mc.account_id AND m.received_date < mc.received_date $archived_by_id AND mc.is_deleted = 0 $trashed_by_id $subread $state_conv_cond_2))";
// $box_cond = "AND IF(EXISTS(SELECT * FROM ".TABLE_PREFIX."mail_contents mc WHERE m.conversation_id = mc.conversation_id AND m.object_id <> o.id AND m.account_id = mc.account_id $archived_by_id AND mc.is_deleted = 0 $trashed_by_id AND $stateConditions), TRUE, $stateConditions)";
//} else {
$conversation_cond = "";
$box_cond = "AND $stateConditions";
//}
/*return self::findByContext(array('limit' => $limit, 'offset' => $start, 'order' => "$order_by $dir",
'extra_conditions' => "$accountConditions $classified $read $conversation_cond $box_cond")); */
return self::instance()->listing(array(
'limit' => $limit,
'start' => $start,
'order' => $order_by,
'order_dir' => $dir,
'extra_conditions' => "$accountConditions $classified $read $conversation_cond $box_cond",
//'count_results' => false,
'join_params' => $join_params
));
//.........这里部分代码省略.........
示例13: user_config_option
</fieldset>
</div>
<div id="trap8"><fieldset id="fs8" style="height:0px;border:0px;padding:0px;display:none"><span style="color:#FFFFFF;"></span></fieldset></div>
<?php
}
// if
?>
<div id="<?php
echo $genid;
?>
add_event_invitation_div" style="display:none" class="og-add-subscribers">
<fieldset id="emailNotification">
<?php
$show_help_option = user_config_option('show_context_help');
if ($show_help_option == 'always' || $show_help_option == 'until_close' && user_config_option('show_add_event_invitation_context_help', true, logged_user()->getId())) {
?>
<div id="addEventPanelContextHelp" class="contextHelpStyle">
<?php
render_context_help($this, 'chelp add event invitation', 'add_event_invitation');
?>
</div>
<?php
}
?>
<legend><?php
echo lang('event invitations');
?>
</legend>
<?php
// ComboBox for Assistance confirmation
示例14: get_url
$dtv = DateTimeValueLib::make(0, 0, 0, $month, $day_of_month, $year);
} else {
if ($day_of_month == $lastday + 1) {
$month++;
if ($month == 13) {
$month = 1;
$year++;
}
}
$p = get_url('event', 'viewdate', array('day' => $day_of_month - $lastday, 'month' => $month, 'year' => $year, 'view_type' => 'viewdate'));
$t = get_url('event', 'add', array('day' => $day_of_month - $lastday, 'month' => $month, 'year' => $year));
$w = $day_of_month - $lastday;
$dtv = DateTimeValueLib::make(0, 0, 0, $month, $w, $year);
}
$loc = Localization::instance();
$start_value = $dtv->format(user_config_option('date_format'));
$popupTitle = lang('add event');
$output .= "><div style='z-index:0; min-height:100px; height:100%;cursor:pointer' onclick=\"og.EventPopUp.show(null, {caller:'overview-panel', day:'" . $dtv->getDay() . "', month:'" . $dtv->getMonth() . "', year:'" . $dtv->getYear() . "', type_id:1, hour:'9', minute:'0', durationhour:1, durationmin:0, start_value: '{$start_value}', start_time:'9:00', title:'" . format_datetime($dtv, 'l, j F', logged_user()->getTimezone()) . "', view: 'week', title: '{$popupTitle}', time_format: '{$timeformat}', hide_calendar_toolbar: 0, genid:{$genid}, otype:" . $event->manager()->getObjectTypeId() . "},'');\") >\n\t\t\t<div class='{$daytitle}' style='text-align:right'>";
//if($day_of_month >= 1){
$output .= "<a class='internalLink' href=\"{$p}\" onclick=\"og.disableEventPropagation(event);\" style='color:#5B5B5B' >{$w}</a>";
// only display this link if the user has permission to add an event
if (!active_project() || ProjectEvent::canAdd(logged_user(), active_project())) {
// if single digit, add a zero
$dom = $day_of_month;
if ($dom < 10) {
$dom = "0" . $dom;
}
// make sure user is allowed to edit the past
}
//}else $output .= " ";
$output .= "</div>";
示例15: get_rendered_member_selectors
function get_rendered_member_selectors()
{
$object_members = array();
$objectId = 0;
if (get_id()) {
$object = Objects::findObject(get_id());
$object_type_id = $object->manager()->getObjectTypeId();
$object_members = $object->getMemberIds();
$objectId = get_id();
} else {
$object_type_id = array_var($_GET, 'objtypeid');
if (array_var($_GET, 'members')) {
$object_members = explode(',', array_var($_GET, 'members'));
}
}
if (count($object_members) == 0) {
$object_members = active_context_members(false);
}
$genid = array_var($_GET, 'genid');
$listeners = array();
//ob_start — Turn on output buffering
//no output is sent from the script (other than headers), instead the output is stored in an internal buffer.
ob_start();
//get skipped dimensions for this view
$view_name = array_var($_GET, 'view_name');
$dimensions_to_show = explode(",", user_config_option($view_name . "_view_dimensions_combos"));
$dimensions_to_skip = array_diff(get_user_dimensions_ids(), $dimensions_to_show);
render_member_selectors($object_type_id, $genid, $object_members, array('listeners' => $listeners), $dimensions_to_skip, null, false);
ajx_current("empty");
//Gets the current buffer contents and delete current output buffer.
//ob_get_clean() essentially executes both ob_get_contents() and ob_end_clean().
ajx_extra_data(array("htmlToAdd" => ob_get_clean()));
ajx_extra_data(array("objectId" => $objectId));
}