Esempio n. 1
0
					<li class="tmce">
						<label for="body">Body:</label>
						<textarea id="body" name="body" class="mce-editor content-area" rows="10" cols="60"><?php 
print htmlentities($form->cv('body'), ENT_QUOTES, 'UTF-8');
?>
</textarea>
					</li>
				</ol>
				<ol>
					<?php 
if ($form->cv('id')) {
    ?>
					<li>
						<label for="pdf_filename">PDF Attachment:</label>
						<div class="attachment"><?php 
    print DataDisplay::truncateFilename($form->cv('pdf_filename'), 35);
    ?>
</div>
					</li>
					<?php 
}
?>
					<li>
						<label><?php 
if ($form->cv('id')) {
    ?>
Replace File:<?php 
} else {
    ?>
Upload File<?php 
}
Esempio n. 2
0
<?php

// Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt
/**
* Used for loading the data using the jquery datatable server side proceesing modal
* Gets the module name as a GET and gets the list query for the module
* The fileds information is stored in the memmber array list_view_field_information of the object
* @see view/listview.php
* @author Abhik Chakraborty
*/
include_once "config.php";
$m = $_GET["m"];
$object = '';
$mid = $_SESSION["do_module"]->get_idmodule_by_name($m, $_SESSION["do_module"]);
$do_data_display = new DataDisplay();
$lp = false;
// if where is already in the query then no need to add the WHERE string
$method_param_used = false;
//custom view date and advanced filter setup
$custom_view_date_filter_qry = '';
$custom_view_adv_filter_qry = false;
$additional_where_condition = '';
if (isset($_GET["lp"]) && $_GET["lp"] == 'y' && isset($_GET["lp_object"]) && $_GET["lp_object"] != '') {
    $object = $_SESSION[$_GET["lp_object"]];
    $method = $_GET["method"];
    $mid = $_GET["lp_mid"];
    $method_param = $_GET["method_param"];
    $do_data_display->set_ds_show_edit_link(false);
    $do_data_display->set_ds_show_detail_link(false);
    $do_data_display->set_ds_show_delete_link(false);
    $do_data_display->set_ds_show_record_selector(false);
Esempio n. 3
0
        ?>
" title="Click to toggle visibility on live site">Hide</a>
						</span>
					</div>
					<div id="item_<?php 
        print $events_item['id'];
        ?>
_details" class="event-info">
						<div class="brief">
							<p class="dates"><?php 
        print date("D M jS Y", strtotime($events_item['start_date']));
        print $events_item['end_date'] == '0000-00-00' ? '' : ' &#8211; ' . date("D M jS Y", strtotime($events_item['end_date']));
        ?>
</p>
							<?php 
        print DataDisplay::truncateText($events_item['description'], 25);
        ?>
						</div>
					</div>
					<p class="groups"><strong>Groups:</strong> <?php 
        print $events_item['Event_groups'] ? implode(', ', Utils::extract('{n}.name', $events_item['Event_groups'])) : 'N/A';
        ?>
</p>
				</li>
				<?php 
    }
} else {
    ?>
				<li class="empty">No event entries available.</li>
				<?php 
}
Esempio n. 4
0
/**
* FIXME
* For some reason when the array index starts with 0 the text box search works well but the asc/desc on the header does not
* So $aColumns array is used for text search and adding a new array $ahColumns for header sort
*/
$aColumns = array();
$col_count = 0;
foreach ($fields_info as $field_name => $info) {
    $aColumns[$col_count++] = $field_name;
}
$ahColumns = array();
$hcol_count = 1;
foreach ($fields_info as $field_name => $info) {
    $ahColumns[$hcol_count++] = $field_name;
}
$do_data_display = new DataDisplay();
if (isset($_GET["iDisplayStart"]) && $_GET["iDisplayLength"] != '-1') {
    $do_data_display->set_ds_sql_start($_GET["iDisplayStart"]);
    $do_data_display->set_ds_sql_max($_GET["iDisplayLength"]);
}
$sOrder = "";
if (isset($_GET['iSortCol_0'])) {
    $sOrder = "ORDER BY  ";
    for ($i = 0; $i < intval($_GET['iSortingCols']); $i++) {
        if ($_GET['bSortable_' . intval($_GET['iSortCol_' . $i])] == "true") {
            $sort_order = strtolower($_GET['sSortDir_' . $i]) == 'desc' ? 'desc' : 'asc';
            if ($fields_info[$ahColumns[intval($_GET['iSortCol_' . $i])]]["field_type"] == 131) {
                if ($mid == 6) {
                    $sOrder .= " organization_member_of " . $sort_order . ", ";
                } else {
                    $sOrder .= " organization_name " . $sort_order . ", ";
Esempio n. 5
0
		</div>
		<?php 
if ($group_list) {
    foreach ($group_list as $group) {
        ?>
		<div id="groupholder-<?php 
        print $group['id'];
        ?>
" class="group">
			<div class="legend">
				<a id="group_<?php 
        print $group['id'];
        ?>
" class="toggle-group open" href="#">Show</a>
				<strong><?php 
        print DataDisplay::truncateString($group['name'], 25);
        ?>
</strong>
			</div>
			<div id="group_<?php 
        print $group['id'];
        ?>
_details" class="group-info clearfix">
				<ul class="group-list" id="group_<?php 
        print $group['id'];
        ?>
_list">
				<?php 
        if ($group['Contacts']) {
            foreach ($group['Contacts'] as $contact) {
                ?>
Esempio n. 6
0
/**
* FIXME
* For some reason when the array index starts with 0 the text box search works well but the asc/desc on the header does not
* So $aColumns array is used for text search and adding a new array $ahColumns for header sort
*/
$aColumns = array();
$col_count = 0;
foreach ($fields_info as $field_name => $info) {
    $aColumns[$col_count++] = $field_name;
}
$ahColumns = array();
$hcol_count = 1;
foreach ($fields_info as $field_name => $info) {
    $ahColumns[$hcol_count++] = $field_name;
}
$do_data_display = new DataDisplay();
if (isset($_GET["iDisplayStart"]) && $_GET["iDisplayLength"] != '-1') {
    $do_data_display->set_ds_sql_start($_GET["iDisplayStart"]);
    $do_data_display->set_ds_sql_max($_GET["iDisplayLength"]);
}
$sOrder = "";
if (isset($_GET['iSortCol_0'])) {
    $sOrder = "ORDER BY  ";
    for ($i = 0; $i < intval($_GET['iSortingCols']); $i++) {
        if ($_GET['bSortable_' . intval($_GET['iSortCol_' . $i])] == "true") {
            $sort_order = strtolower($_GET['sSortDir_' . $i]) == 'desc' ? 'desc' : 'asc';
            $sOrder .= $ahColumns[intval($_GET['iSortCol_' . $i])] . " " . $sort_order . " ,";
        }
    }
    $sOrder = substr_replace($sOrder, "", -2);
    if ($sOrder == "ORDER BY") {
Esempio n. 7
0
 /**
  * @abstract Displays a page, and calls itself for any page children
  * @param array $pages An array of a page and its children
  * @param string $ul The ul string to use for the current level
  * @return string
  * @access public
  */
 public function pageOptionGroups($pages = false, $group = false, $opt_selected = false, $editing_page_id = false, $parents = array())
 {
     $pages = $pages ? $pages : $this->loadPages();
     if (is_array($pages)) {
         $html = $group ? '<optgroup>' : '';
         foreach ($pages as $page) {
             if (isset($page['page'])) {
                 // unavailable parents
                 if ($page['page']['parent_id']) {
                     $parents = array_merge(array($page['page']['parent_id']), $parents);
                 }
                 if ($editing_page_id !== $page['page']['page_id'] && !in_array($editing_page_id, $parents)) {
                     $selected = $opt_selected == $page['page']['page_id'] ? ' selected="selected"' : '';
                     $html .= sprintf('<option value="%d"%s>%s</option>', $page['page']['page_id'], $selected, DataDisplay::truncateString($page['page']['page_title'], 35));
                 }
                 if (isset($page['children'])) {
                     $html .= $this->pageOptionGroups($page['children'], true, $opt_selected, $editing_page_id, $parents);
                 }
             }
         }
         $html .= $group ? '</optgroup>' : '';
         return $html;
     }
 }
Esempio n. 8
0
			<ul id="past-list" class="list-display">
				<?php 
if ($past_news) {
    foreach ($past_news as $record) {
        ?>
				<li id="item_<?php 
        print $record['id'];
        ?>
_listing">
					<div class="legend">
						<a id="item_<?php 
        print $record['id'];
        ?>
" class="toggle-news open" href="#">Hide</a>
						<strong><?php 
        print DataDisplay::truncateText($record['title'], 5);
        ?>
</strong>
						<span class="icons">
							<a class="edit" href="<?php 
        print $this->xhtmlUrl('edit', array('id' => $record['id']));
        ?>
" title="Edit this News Item">Edit</a>
							<a class="delete confirm" href="<?php 
        print $this->xhtmlUrl('delete', array('id' => $record['id']));
        ?>
" title="Are you sure you want to delete this news article?">Delete</a>
							<a href="#" id="vis_toggle_<?php 
        print $record['id'];
        ?>
" class="vis_toggle <?php