本文整理汇总了PHP中module_form类的典型用法代码示例。如果您正苦于以下问题:PHP module_form类的具体用法?PHP module_form怎么用?PHP module_form使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了module_form类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: process
public function process()
{
if ('save_faq_product' == $_REQUEST['_process']) {
if (!module_faq::can_i('edit', 'FAQ')) {
die('No perms to save faq.');
}
if (isset($_POST['envato_item_ids'])) {
$_POST['envato_item_ids'] = implode('|', $_POST['envato_item_ids']);
}
$faq_product_id = update_insert('faq_product_id', $_REQUEST['faq_product_id'], 'faq_product', $_POST);
if (isset($_REQUEST['butt_del'])) {
// deleting ticket type all together
if (module_form::confirm_delete('customer_id', _l("Really delete FAQ Product?"), self::link_open_faq_product($_REQUEST['faq_product_id']))) {
delete_from_db('faq_product', 'faq_product_id', $_REQUEST['faq_product_id']);
set_message('FAQ Product deleted successfully.');
redirect_browser($this->link_open_faq_product(false));
}
}
set_message('FAQ Product saved successfully');
redirect_browser($this->link_open_faq_product($faq_product_id));
} else {
if ('save_faq' == $_REQUEST['_process']) {
if (!module_faq::can_i('edit', 'FAQ')) {
die('No perms to save faq.');
}
if (isset($_REQUEST['new_product_name']) && strlen(trim($_REQUEST['new_product_name']))) {
$faq_product_id = update_insert('faq_product_id', false, 'faq_product', array('name' => trim($_REQUEST['new_product_name'])));
if (!isset($_REQUEST['faq_product_ids'])) {
$_REQUEST['faq_product_ids'] = array();
}
$_REQUEST['faq_product_ids'][] = $faq_product_id;
}
$faq_id = update_insert('faq_id', $_REQUEST['faq_id'], 'faq', $_POST);
delete_from_db('faq_product_rel', 'faq_id', $faq_id);
if (isset($_REQUEST['faq_product_ids']) && is_array($_REQUEST['faq_product_ids'])) {
foreach ($_REQUEST['faq_product_ids'] as $faq_product_id) {
if ((int) $faq_product_id > 0) {
$sql = "INSERT INTO `" . _DB_PREFIX . "faq_product_rel` SET faq_id = " . (int) $faq_id . ", faq_product_id = " . (int) $faq_product_id;
query($sql);
}
}
}
if (isset($_REQUEST['butt_del'])) {
// deleting ticket type all together
if (module_form::confirm_delete('customer_id', _l("Really delete FAQ item?"), self::link_open($_REQUEST['faq_id']))) {
delete_from_db('faq', 'faq_id', $_REQUEST['faq_id']);
delete_from_db('faq_product_rel', 'faq_id', $_REQUEST['faq_id']);
set_message('FAQ deleted successfully.');
redirect_browser($this->link_open(false));
}
}
set_message('FAQ saved successfully');
redirect_browser($this->link_open($faq_id));
}
}
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:56,代码来源:faq.php
示例2: process
public function process()
{
$errors = array();
if (isset($_REQUEST['butt_del']) && $_REQUEST['butt_del'] && $_REQUEST['report_id']) {
$data = self::get_report($_REQUEST['report_id']);
if (module_form::confirm_delete('report_id', "Really delete " . _l('Report') . ": " . $data['name'], self::link_open($_REQUEST['report_id']))) {
$this->delete_report($_REQUEST['report_id']);
set_message(_l('Report') . " deleted successfully");
redirect_browser(self::link_open(false));
}
} else {
if ("save_report" == $_REQUEST['_process']) {
$report_id = $this->save_report($_REQUEST['report_id'], $_POST);
$_REQUEST['_redirect'] = $this->link_open($report_id);
set_message(_l('Report') . " saved successfully");
}
}
if (!count($errors)) {
redirect_browser($_REQUEST['_redirect']);
exit;
}
print_error($errors, true);
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:23,代码来源:report.php
示例3: array
<input type="hidden" name="<?php
echo $use_master_key;
?>
" value="<?php
echo $search[$use_master_key];
?>
">
<?php
}
?>
<?php
$search_bar = array('elements' => array('name' => array('title' => _l('Contact Name, Email or Phone Number:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '', 'size' => 30))));
echo module_form::search_bar($search_bar);
/** START TABLE LAYOUT **/
$table_manager = module_theme::new_table_manager();
$columns = array();
$columns['name'] = array('title' => 'Name', 'callback' => function ($user) {
echo module_user::link_open_contact($user['user_id'], true, $user);
if ($user['is_primary'] == $user['user_id']) {
echo ' *';
}
}, 'cell_class' => 'row_action');
$columns['phone'] = array('title' => 'Phone Number', 'callback' => function ($user) {
module_user::print_contact_summary($user['user_id'], 'html', array('phone|mobile'));
});
$columns['email'] = array('title' => 'Email Address', 'callback' => function ($user) {
module_user::print_contact_summary($user['user_id'], 'html', array('email'));
});
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:contact_admin_list.php
示例4: unset
</a>
</li>
<?php
}
unset($menu_holder);
unset($menu_type);
unset($current_link);
unset($menu_allow_nesting);
?>
<?php
if (isset($show_quick_search) && $show_quick_search) {
?>
<?php
if (module_security::getcred() && module_security::can_user(module_security::get_loggedin_id(), 'Show Quick Search') && $display_mode != 'mobile') {
if (module_config::c('global_search_focus', 1) == 1) {
module_form::set_default_field('ajax_search_text');
}
?>
<li>
<div id="quick_search_box">
<div id="quick_search_placeholder"><div><?php
_e('Quick Search:');
?>
</div></div>
<input type="text" name="quick_search" id="ajax_search_text" size="10" value="">
<div id="ajax_search_result"></div>
</div>
</li>
<?php
}
handle_hook('top_menu_end');
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:design_menu.php
示例5: unserialize
?>
</td>
<td><?php
$headers = unserialize($n['headers']);
if (isset($headers['to']) && is_array($headers['to'])) {
foreach ($headers['to'] as $to) {
echo $to['email'] . ' ';
}
}
?>
</td>
<td><?php
echo module_user::link_open($n['create_user_id'], true);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div style="min-height: 10px;">
<?php
echo $pagination['page_numbers'] > 1 ? $pagination['links'] : '';
?>
</div>
</div>
<?php
$fieldset_data['elements_before'] = ob_get_clean();
echo module_form::generate_fieldset($fieldset_data);
开发者ID:sgh1986915,项目名称:php-crm,代码行数:30,代码来源:email_widget.php
示例6: get_form_element
//.........这里部分代码省略.........
$new_attributes = array();
foreach ($attributes as $aid => $a) {
$new_attributes[$aid + 1] = $a;
}
$attributes = $new_attributes;
}
if (isset($attributes[$value])) {
echo $attributes[$value];
}
break;
case 'textarea':
case 'textbox':
echo nl2br(htmlspecialchars($value));
break;
case 'file':
if ($value) {
$file_data = @unserialize($value);
$file_link = 'includes/plugin_data/upload/' . $file_data['file'];
if (is_file($file_link)) {
$download_link = self::link_public_file_download($data_record['data_record_id'], $data_record['data_type_id'], $element['data_field_group_id'], $element['data_field_id']);
echo '<a href="' . $download_link . '" target="_blank">' . $file_data['name'] . '</a>';
} else {
echo 'File Not Found';
}
}
break;
case 'wysiwyg':
echo module_security::purify_html($value);
break;
case 'encrypted':
if (class_exists('module_encrypt', false)) {
ob_start();
$element['type'] = 'text';
module_form::generate_form_element($element);
$enc_html = ob_get_clean();
echo module_encrypt::parse_html_input('custom_data', $enc_html, false);
}
break;
case 'created_date_time':
echo isset($data_record['date_created']) && $data_record['date_created'] != '0000-00-00 00:00:00' ? print_date($data_record['date_created'], true) : _l('N/A');
break;
case 'created_date':
echo isset($data_record['date_created']) && $data_record['date_created'] != '0000-00-00 00:00:00' ? print_date($data_record['date_created'], false) : _l('N/A');
break;
case 'created_time':
echo isset($data_record['date_created']) && $data_record['date_created'] != '0000-00-00 00:00:00' ? date(module_config::c('time_format', 'g:ia'), strtotime($data_record['date_created'])) : _l('N/A');
break;
case 'updated_date_time':
echo isset($data_record['date_updated']) && $data_record['date_updated'] != '0000-00-00 00:00:00' ? print_date($data_record['date_updated'], true) : (isset($data_record['date_created']) && $data_record['date_created'] != '0000-00-00 00:00:00' ? print_date($data_record['date_created'], true) : _l('N/A'));
break;
case 'updated_date':
echo isset($data_record['date_updated']) && $data_record['date_updated'] != '0000-00-00 00:00:00' ? print_date($data_record['date_updated'], false) : (isset($data_record['date_created']) && $data_record['date_created'] != '0000-00-00 00:00:00' ? print_date($data_record['date_created'], false) : _l('N/A'));
break;
case 'updated_time':
echo isset($data_record['date_updated']) && $data_record['date_updated'] != '0000-00-00 00:00:00' ? date(module_config::c('time_format', 'g:ia'), strtotime($data_record['date_updated'])) : (isset($data_record['date_created']) && $data_record['date_created'] != '0000-00-00 00:00:00' ? date(module_config::c('time_format', 'g:ia'), strtotime($data_record['date_created'])) : _l('N/A'));
break;
case 'created_by':
echo isset($data_record['create_user_id']) && (int) $data_record['create_user_id'] > 0 ? module_user::link_open($data_record['create_user_id'], true) : _l('N/A');
break;
case 'updated_by':
echo isset($data_record['update_user_id']) && (int) $data_record['update_user_id'] > 0 ? module_user::link_open($data_record['update_user_id'], true) : (isset($data_record['create_user_id']) && (int) $data_record['create_user_id'] > 0 ? module_user::link_open($data_record['create_user_id'], true) : _l('N/A'));
break;
case 'url':
echo '<a href="' . htmlspecialchars($value) . '" target="_blank">' . htmlspecialchars($value) . '</a>';
break;
default:
开发者ID:sgh1986915,项目名称:php-crm,代码行数:67,代码来源:data.php
示例7: print_search_bar
public static function print_search_bar($owner_table, $options = array())
{
// let the themes override this search bar function.
if (self::can_i('view', 'Extra Fields')) {
$result = hook_handle_callback('extra_fields_search_bar', $owner_table, $options);
if (is_array($result)) {
// has been handed by a theme.
echo current($result);
} else {
$defaults = self::get_defaults($owner_table);
$searchable_fields = array();
foreach ($defaults as $default) {
if (isset($default['searchable']) && $default['searchable']) {
$searchable_fields[$default['key']] = $default;
}
}
foreach ($searchable_fields as $searchable_field) {
?>
<td class="search_title">
<?php
echo htmlspecialchars($searchable_field['key']);
?>
:
</td>
<td class="search_input">
<?php
module_form::generate_form_element(array('type' => 'text', 'name' => 'search[extra_fields][' . htmlspecialchars($searchable_field['key']) . ']'));
?>
</td>
<?php
}
}
}
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:36,代码来源:extra.php
示例8: process
public function process()
{
$errors = array();
if (isset($_REQUEST['butt_del']) && $_REQUEST['butt_del'] && $_REQUEST['quote_id']) {
$data = self::get_quote($_REQUEST['quote_id']);
if (module_form::confirm_delete('quote_id', "Really delete quote: " . $data['name'], self::link_open($_REQUEST['quote_id']))) {
$this->delete_quote($_REQUEST['quote_id']);
set_message("quote deleted successfully");
redirect_browser($this->link_open(false));
}
} else {
if ("ajax_quote_list" == $_REQUEST['_process']) {
$customer_id = isset($_REQUEST['customer_id']) ? (int) $_REQUEST['customer_id'] : 0;
$res = module_quote::get_quotes(array('customer_id' => $customer_id));
$options = array();
foreach ($res as $row) {
$options[$row['quote_id']] = $row['name'];
}
echo json_encode($options);
exit;
} else {
if ("ajax_create_invoice" == $_REQUEST['_process']) {
$quote_id = (int) $_REQUEST['quote_id'];
$quote = self::get_quote($quote_id, true);
$quote_tasks = self::get_tasks($quote_id);
if (!$quote || $quote['quote_id'] != $quote_id) {
exit;
}
// no permissions.
if (!module_invoice::can_i('create', 'Invoices')) {
exit;
}
// no permissions
ob_start();
?>
<p><?php
_e('Please select which tasks to generate an invoice for:');
?>
</p>
<ul>
<?php
foreach ($quote['uninvoiced_quote_task_ids'] as $quote_task_id) {
if (isset($quote_tasks[$quote_task_id])) {
?>
<li>
<input type="checkbox" id="invoice_create_task_<?php
echo $quote_task_id;
?>
" data-taskid="<?php
echo $quote_task_id;
?>
" class="invoice_create_task" name="invoice_quote_task_id[<?php
echo $quote_task_id;
?>
]" value="1" <?php
echo $quote_tasks[$quote_task_id]['fully_completed'] ? 'checked' : '';
?>
>
<label for="invoice_create_task_<?php
echo $quote_task_id;
?>
">
(#<?php
echo $quote_tasks[$quote_task_id]['task_order'];
?>
)
<?php
echo htmlspecialchars($quote_tasks[$quote_task_id]['description']);
?>
</label>
</li>
<?php
}
}
?>
</ul>
<?php
$html = ob_get_clean();
echo $html;
exit;
} else {
if ("ajax_task" == $_REQUEST['_process']) {
// we are requesting editing a task.
$quote_id = (int) $_REQUEST['quote_id'];
$quote = self::get_quote($quote_id, true);
$quote_tasks = self::get_tasks($quote_id);
if (!$quote || $quote['quote_id'] != $quote_id) {
exit;
}
// no permissions.
if (!self::can_i('edit', 'Quote Tasks')) {
exit;
}
// no permissions
if (isset($_REQUEST['toggle_completed'])) {
$quote_task_id = (int) $_REQUEST['quote_task_id'];
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:quote.php
示例9: process
public function process()
{
$errors = array();
if (isset($_REQUEST['butt_del']) && $_REQUEST['butt_del'] && $_REQUEST['job_id']) {
$data = self::get_job($_REQUEST['job_id']);
if (module_form::confirm_delete('job_id', _l("Really delete job: %s", $data['name']), self::link_open($_REQUEST['job_id']))) {
$this->delete_job($_REQUEST['job_id']);
set_message("job deleted successfully");
redirect_browser($this->link_open(false));
}
} else {
if ("ajax_job_list" == $_REQUEST['_process']) {
$customer_id = isset($_REQUEST['customer_id']) ? (int) $_REQUEST['customer_id'] : 0;
$res = module_job::get_jobs(array('customer_id' => $customer_id));
$options = array();
foreach ($res as $row) {
$options[$row['job_id']] = $row['name'];
}
echo json_encode($options);
exit;
} else {
if ("ajax_create_invoice" == $_REQUEST['_process']) {
$job_id = (int) $_REQUEST['job_id'];
$job = self::get_job($job_id, true);
$job_tasks = self::get_tasks($job_id);
if (!$job || $job['job_id'] != $job_id) {
exit;
}
// no permissions.
if (!module_invoice::can_i('create', 'Invoices')) {
exit;
}
// no permissions
ob_start();
?>
<p><?php
_e('Please select which tasks to generate an invoice for:');
?>
</p>
<ul>
<?php
foreach ($job['uninvoiced_task_ids'] as $task_id) {
if (isset($job_tasks[$task_id])) {
?>
<li>
<input type="checkbox" id="invoice_create_task_<?php
echo $task_id;
?>
" data-taskid="<?php
echo $task_id;
?>
" class="invoice_create_task" name="invoice_task_id[<?php
echo $task_id;
?>
]" value="1" <?php
echo $job_tasks[$task_id]['fully_completed'] ? 'checked' : '';
?>
>
<label for="invoice_create_task_<?php
echo $task_id;
?>
">
(#<?php
echo $job_tasks[$task_id]['task_order'];
?>
)
<?php
echo htmlspecialchars($job_tasks[$task_id]['description']);
?>
</label>
</li>
<?php
}
}
?>
</ul>
<?php
$html = ob_get_clean();
echo $html;
exit;
} else {
if ("ajax_task" == $_REQUEST['_process']) {
// we are requesting editing a task.
$job_id = (int) $_REQUEST['job_id'];
$job = self::get_job($job_id, true);
$job_tasks = self::get_tasks($job_id);
if (!$job || $job['job_id'] != $job_id) {
exit;
}
// no permissions.
if (!self::can_i('edit', 'Job Tasks')) {
exit;
}
// no permissions
if (isset($_REQUEST['toggle_completed'])) {
$task_id = (int) $_REQUEST['task_id'];
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:job.php
示例10: process
public function process()
{
if ('language_reset' == $_REQUEST['_process'] && $_REQUEST['really'] == 'yes') {
if (!module_form::check_secure_key()) {
return;
}
// delete all language words and translations
$sql = "DELETE FROM `" . _DB_PREFIX . "language_word` WHERE 1";
query($sql);
$sql = "DELETE FROM `" . _DB_PREFIX . "language_translation` WHERE 1";
query($sql);
set_message('Translation reset successfully');
redirect_browser($_SERVER['REQUEST_URI']);
}
if ('remove_duplicates' == $_REQUEST['_process'] && isset($_REQUEST['duplicate_ids'])) {
if (!module_form::check_secure_key()) {
return;
}
$duplicate_ids = json_decode($_REQUEST['duplicate_ids'], true);
foreach ($duplicate_ids as $duplicate_id) {
$sql = "DELETE FROM `" . _DB_PREFIX . "language_word` WHERE language_word_id = '" . (int) $duplicate_id . "' LIMIT 1";
query($sql);
}
set_message('Translation errors removed successfully');
redirect_browser($_SERVER['REQUEST_URI']);
} else {
if ('language_duplicate_remove' == $_REQUEST['_process'] && $_REQUEST['really'] == 'yep') {
if (!module_form::check_secure_key()) {
return;
}
// delete all language words and translations
$sql = "SELECT `word`, COUNT(*) as cc FROM `" . _DB_PREFIX . "language_word` GROUP BY `word` HAVING cc > 1";
$res = qa($sql);
foreach ($res as $r) {
if ($r['word'] && $r['cc'] > 1) {
// remove duplicates.
$sql = "SELECT * FROM `" . _DB_PREFIX . "language_word` WHERE `word` = '" . mysql_real_escape_string($r['word']) . "' ";
$duplicates = qa($sql);
// doing this due to incorrect collate in earlier version of UCM
$words_casesensitive = array();
foreach ($duplicates as $duplicate) {
$words_casesensitive[$duplicate['word']][$duplicate['language_word_id']] = $duplicate['language_word_id'];
}
//print_r($words_casesensitive);exit;
foreach ($words_casesensitive as $word => $duplicate_ids) {
if (count($duplicate_ids) > 1) {
$first = false;
foreach ($duplicate_ids as $language_word_id) {
if ($first === false) {
$first = $language_word_id;
} else {
if ($first) {
// remove this one and replace any translations with the first one.
$sql = "DELETE FROM `" . _DB_PREFIX . "language_word` WHERE language_word_id = '" . (int) $language_word_id . "' LIMIT 1";
query($sql);
$sql = "UPDATE `" . _DB_PREFIX . "language_translation` SET language_word_id = '" . (int) $first . "' WHERE language_word_id = '" . (int) $language_word_id . "'";
query($sql);
}
}
}
}
}
}
}
$sql = "DELETE FROM `" . _DB_PREFIX . "language_word` WHERE `word` LIKE 'SQL Error%'";
query($sql);
// merge languages - error if case of language changes, keeps creating new language entries - eg FR fr
$sql = "SELECT `language_id`, `language_code`, COUNT(*) as cc FROM `" . _DB_PREFIX . "language` GROUP BY `language_code`";
$res = query($sql);
while ($row = mysql_fetch_assoc($res)) {
if ($row['cc'] > 1) {
// merge these!
$sql = "SELECT language_id FROM `" . _DB_PREFIX . "language` WHERE `language_code` = '" . mysql_real_escape_string($row['language_code']) . "' AND language_id != " . (int) $row['language_id'] . "";
$to_merge = query($sql);
while ($merge = mysql_fetch_assoc($to_merge)) {
$sql = "UPDATE `" . _DB_PREFIX . "language_translation` SET language_id = " . (int) $row['language_id'] . " WHERE language_id = " . (int) $merge['language_id'] . "";
query($sql);
// remove any that didn't update correctly (duplicate entries)
$sql = "DELETE FROM `" . _DB_PREFIX . "language_translation` WHERE language_id = " . (int) $merge['language_id'] . "";
query($sql);
$sql = "DELETE FROM `" . _DB_PREFIX . "language` WHERE language_id = " . (int) $merge['language_id'] . " LIMIT 1";
query($sql);
}
}
}
set_message('Translation duplicates removed successfully');
redirect_browser($_SERVER['REQUEST_URI']);
}
}
if ('save_language_translation' == $_REQUEST['_process']) {
if (!module_form::check_secure_key()) {
return;
}
if (!module_config::can_i('view', 'Settings')) {
redirect_browser(_BASE_HREF);
}
if (!module_config::can_i('edit', 'Settings')) {
redirect_browser(_BASE_HREF);
}
if (!module_language::can_i('edit', 'Language')) {
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:language.php
示例11: link_it
$(this).change(function(){
link_it( $(this)[0].checked ? $(this).val() : false );
});
$(this).mouseup(function(){
link_it( $(this)[0].checked ? $(this).val() : false );
});
});
});
</script>
<form action="" method="post" id="quick_add_form">
<input type="hidden" name="_process" value="quick_save_finance">
<input type="hidden" name="finance_id" value="new">
<?php
module_form::set_default_field('new_transaction_name');
$table_manager = module_theme::new_table_manager();
$columns = array();
$columns['sort_date'] = array('title' => 'Date', 'callback' => function (&$finance) {
if (!isset($finance['transaction_date'])) {
return false;
}
// loop over all finance records and print the values out, only if they differ.
// only print dates if they differ from the others.
$dates = array();
//$links = array();
$dates[print_date($finance['transaction_date'])] = true;
//$links[$finance['url']]=!trim($finance['name']) ? 'N/A' : htmlspecialchars($finance['name']);
if ($finance['finance_record']) {
if (isset($finance['finance_record']['linked_finances'])) {
foreach ($finance['finance_record']['linked_finances'] as $f) {
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:finance_list.php
示例12: display_pagination_hook
//.........这里部分代码省略.........
<span id="bulk_popdown" style="position: absolute; width: 200px; display: none; background: #EFEFEF; margin-left: -210px; margin-top: 30px; border: 1px solid #CCC; text-align: left; padding: 6px; z-index: 3;">
<strong><?php
_e('Bulk actions:');
?>
</strong><br/>
<?php
foreach (self::$pagination_options['bulk_actions'] as $bulk_action_id => $bulk_action_data) {
switch ($bulk_action_data['type']) {
case 'delete':
?>
<input type="checkbox" class="bulk_action" name="bulk_action[<?php
echo $bulk_action_id;
?>
]" id="bulkchk<?php
echo $bulk_action_id;
?>
" value="yes">
<label for="bulkchk<?php
echo $bulk_action_id;
?>
"><?php
_e($bulk_action_data['label']);
?>
</label> <br/>
<?php
break;
case 'form':
?>
<input type="checkbox" class="bulk_action" name="bulk_action[<?php
echo $bulk_action_id;
?>
]" id="bulkchk<?php
echo $bulk_action_id;
?>
" value="yes">
<label for="bulkchk<?php
echo $bulk_action_id;
?>
"><?php
_e($bulk_action_data['label']);
?>
</label>
<?php
if (isset($bulk_action_data['elements'])) {
foreach ($bulk_action_data['elements'] as $element) {
module_form::generate_form_element($element);
}
}
?>
<br/>
<?php
break;
default:
?>
<input type="checkbox" class="bulk_action" name="bulk_action[<?php
echo $bulk_action_id;
?>
]" id="bulkchk<?php
echo $bulk_action_id;
?>
" value="yes">
<label for="bulkchk<?php
echo $bulk_action_id;
?>
"><?php
_e($bulk_action_data['label']);
?>
</label> <br/>
<?php
break;
}
?>
<?php
}
?>
<input type="hidden" name="bulk_action_go" id="bulk_action_go" value="">
<input type="button" name="bulk_action_button" id="bulk_action_button" value="<?php
_e('Perform Bulk Actions');
?>
">
<script type="text/javascript">
$(function(){
$('#bulk_action_button').click(function(){
$('#bulk_action_go').val('yes');
// todo: if no form, create one them submit.
$('#bulk_action_go').parents('form')[0].submit();
});
});
</script>
</span>
</span>
<?php
}
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:group.php
示例13: htmlspecialchars
?>
" />
<input type="hidden" name="total_tax_name" value="<?php
echo htmlspecialchars($invoice['total_tax_name']);
?>
" />
<input type="hidden" name="hourly_rate" value="<?php
echo htmlspecialchars($invoice['hourly_rate']);
?>
" />
<?php
$fields = array('fields' => array('name' => 'Name'));
module_form::set_required($fields);
module_form::prevent_exit(array('valid_exits' => array('.submit_button', '.save_invoice_item', '.save_invoice_payment', '.delete', '.apply_discount')));
?>
<table cellpadding="10" width="100%">
<tbody>
<tr>
<td valign="top" width="35%">
<h3><?php
echo _l('%sCredit Note Details', !$invoice_id ? _l('New ') : '');
?>
(BETA!)</h3>
<table border="0" cellspacing="0" cellpadding="2" class="tableclass tableclass_form tableclass_full">
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:invoice_admin_credit.php
示例14: metis_generate_form_actions
function metis_generate_form_actions($callback, $options)
{
$defaults = array('type' => 'action_bar', 'class' => 'action_bar', 'elements' => array());
$options = array_merge($defaults, $options);
//todo - hook in here for themes.
ob_start();
?>
<div class="action_bar_duplicate <?php
echo $options['class'];
?>
">
<?php
foreach ($options['elements'] as $element) {
if (is_array($element) && !is_array(current($element))) {
$element = array($element);
}
$element['fields'] = $element;
?>
<span class="action">
<?php
if (isset($element['fields'])) {
?>
<span class="action_element">
<?php
if (is_array($element['fields'])) {
foreach ($element['fields'] as $dataid => $field) {
if (is_array($field)) {
// treat this as a call to the form generate option
switch ($field['type']) {
case 'save_button':
$field['type'] = 'submit';
$field['class'] = (isset($field['class']) ? $field['class'] . ' ' : '') . 'submit_button btn btn-success';
break;
case 'submit':
$field['type'] = 'submit';
$field['class'] = (isset($field['class']) ? $field['class'] . ' ' : '') . 'submit_button btn btn-default';
break;
case 'delete_button':
$field['type'] = 'submit';
$field['class'] = (isset($field['class']) ? $field['class'] . ' ' : '') . 'submit_button btn btn-danger';
break;
case 'button':
$field['type'] = 'button';
$field['class'] = (isset($field['class']) ? $field['class'] . ' ' : '') . 'submit_button btn btn-default';
break;
}
module_form::generate_form_element($field);
echo ' ';
} else {
echo $field . ' ';
}
}
} else {
echo $element['fields'];
}
?>
</span>
<?php
}
?>
</span>
<?php
}
?>
</div>
<?php
return ob_get_clean();
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:68,代码来源:metis_functions.php
示例15: _e
</td>
<td colspan="<?php
echo $colspan;
?>
" valign="top">
<?php
if (module_invoice::can_i('view', 'Invoices')) {
?>
<div>
<?php
_e('Task Type:');
?>
<?php
$types = module_job::get_task_types();
$types['-1'] = _l('Default (%s)', $types[$job['default_task_type']]);
module_form::generate_form_element(array('type' => 'select', 'name' => 'job_task[' . $task_id . '][manual_task_type]', 'id' => 'manual_task_type_' . $task_id, 'options' => $types, 'blank' => false, 'value' => $task_data['manual_task_type_real']));
?>
</div>
<?php
}
?>
<div>
<?php
if ($task_data['manual_task_type'] == _TASK_TYPE_HOURS_AMOUNT && (module_config::c('job_task_log_all_hours', 1) || $task_data[$hours_prefix . 'hours'] != 0)) {
if (function_exists('decimal_time_out')) {
$completed_value = decimal_time_out($task_data['completed']);
$hours_value = decimal_time_out($task_data[$hours_prefix . 'hours']);
} else {
$completed_value = number_out($task_data['completed'], true);
$hours_value = number_out($task_data[$hours_prefix . 'hours'], true);
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ajax_task_edit.php
示例16: process
public function process()
{
if (isset($_REQUEST['butt_del']) && $_REQUEST['butt_del'] && $_REQUEST['subscription_id']) {
$data = self::get_subscription($_REQUEST['subscription_id']);
if (module_form::confirm_delete('subscription_id', "Really delete subscription: " . $data['name'], self::link_open($_REQUEST['subscription_id']))) {
$this->delete_subscription($_REQUEST['subscription_id']);
set_message("Subscription deleted successfully");
redirect_browser(self::link_open(false));
}
} else {
if ("save_subscription" == $_REQUEST['_process']) {
$subscription_id = $this->save_subscription($_REQUEST['subscription_id'], $_POST);
set_message("Subscription saved successfully");
redirect_browser(self::link_open($subscription_id));
}
}
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:17,代码来源:subscription.php
|
请发表评论