コード例 #1
0
/** 
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
if (!module_data::can_i('edit', _MODULE_DATA_NAME)) {
    die("access denied");
}
$data_types = $module->get_data_types();
$menu_locations = module_data::get_menu_locations();
$header_buttons = array();
if (module_data::can_i('create', _MODULE_DATA_NAME)) {
    $header_buttons[] = array('url' => module_data::link_open_data_type('new'), 'title' => "Create New " . _MODULE_DATA_NAME);
}
print_heading(array('main' => true, 'type' => 'h2', 'title' => _MODULE_DATA_NAME, 'button' => $header_buttons));
?>


<table class="tableclass tableclass_rows tableclass_full">
	<thead>
	<tr class="title">
    	<th><?php 
echo _l('Data Type');
?>
</th>
    	<th><?php 
echo _l('Menu Location');
コード例 #2
0
    $header_buttons = array();
    if (module_data::can_i('edit', _MODULE_DATA_NAME)) {
        $header_buttons[] = array('url' => $module->link_open_data_type($data_type['data_type_id']), 'title' => 'Settings');
    }
    if ($module->can_i('create', $data_type['data_type_name'])) {
        // todo: perms for each data type
        $header_buttons[] = array('url' => $module->link('', array('data_type_id' => $data_type['data_type_id'], 'data_record_id' => 'new', 'mode' => 'edit', 'parent_data_record_id' => isset($parent_data_record_id) ? $parent_data_record_id : false)), 'title' => "Create New " . htmlspecialchars($data_type['data_type_name']));
    }
    if ($allow_search) {
        $header_buttons[] = array('url' => $module->link("", array('search_form' => 1, 'data_type_id' => $data_type_id, 'view_all' => isset($_REQUEST['view_all']) ? 1 : false)), 'title' => "Search");
    }
    if (_DEMO_MODE) {
        ?>
        <div style="padding:20px; text-align: center">This is a demo of the new Custom Data Forms
            feature. <?php 
        if (module_data::can_i('edit', _MODULE_DATA_NAME)) {
            ?>
 Please feel free to change the <a
                    href="<?php 
            echo $module->link_open_data_type($data_type['data_type_id']);
            ?>
">Settings</a> for this Custom Data Form. <?php 
        }
        ?>
More details are <a
                href="http://ultimateclientmanager.com/support/documentation-wiki/custom-data-forms/" target="_blank">located
                here in the Documentation</a>.
        </div> <?php 
    }
    print_heading(array('main' => isset($parent_data_record_id) && $parent_data_record_id ? false : true, 'type' => 'h2', 'title' => get_display_mode() == 'iframe' ? '' : htmlspecialchars($data_type['data_type_name']), 'button' => $header_buttons));
    include 'admin_data_list_output.php';