/** * Display Global Settings */ function display_global_settings() { $this->_update_global_settings(); // load the language file $this->EE->lang->loadfile('playa'); // load the table lib $this->EE->load->library('table'); // load the CSS $this->_include_theme_css('styles/global_settings.css'); // use the default template known as // $cp_pad_table_template in the views $this->EE->table->set_template(array('table_open' => '<table class="mainTable padTable" border="0" cellspacing="0" cellpadding="0">', 'row_start' => '<tr class="even">', 'row_alt_start' => '<tr class="odd">')); // "Preference" and "Setting" table headings $this->EE->table->set_heading(array('data' => lang('preference'), 'style' => 'width: 50%'), lang('setting')); // ------------------------------------------- // License Key // ------------------------------------------- $this->EE->table->add_row(lang('license_key', 'license_key'), form_input('license_key', $this->settings['license_key'], 'id="license_key" size="40"')); // ------------------------------------------- // Filter Min // ------------------------------------------- $this->EE->table->add_row(lang('filter_min', 'filter_min') . '<br/>' . lang('filter_min_desc'), form_input('filter_min', $this->settings['filter_min'], 'id="filter_min" size="3" style="width: 3em;"')); // ------------------------------------------- // Relationship field conversion // ------------------------------------------- // Accomodate the schema changes if (version_compare(APP_VER, '2.6', '<')) { $field_types = array('"rel"', '"mrel"'); } else { $field_types = array('"relationship"'); } $field_types = implode(",", $field_types); $query = $this->EE->db->query('SELECT cf.field_id, cf.field_label, fg.group_name FROM exp_channel_fields AS cf INNER JOIN exp_field_groups AS fg ON cf.group_id = fg.group_id WHERE cf.field_type IN (' . $field_types . ')'); if ($query->num_rows()) { // load the Admin Content lang file $this->EE->lang->loadfile('admin_content'); // initialize a new Table object $table = new CI_Table(); // set the template $table->set_template(array('table_open' => '<table class="playaConvertRel" border="0" cellspacing="0" cellpadding="0"')); // "Field Group", "Field Name", and "Convert?" table headings $table->set_heading(lang('field_group'), lang('field_name'), lang('convert')); // add each of the Rel fields foreach ($query->result() as $field) { $table->add_row($field->group_name, $field->field_label, form_radio('convert_rel_field[' . $field->field_id . ']', 'y', FALSE, 'id="convert_rel_field_' . $field->field_id . '_y"') . NL . lang('yes', 'convert_rel_field_' . $field->field_id . '_y') . NBS . NBS . NBS . NBS . NBS . NL . form_radio('convert_rel_field[' . $field->field_id . ']', 'n', TRUE, 'id="convert_rel_field_' . $field->field_id . '_n"') . NL . lang('no', 'convert_rel_field_' . $field->field_id . '_n')); } // add the row to the main table $this->EE->table->add_row(lang('convert_rel_fields', 'convert_rel_fields') . '<br/>' . lang('convert_rel_fields_info'), $table->generate()); } // ------------------------------------------- // Related Entries conversion // ------------------------------------------- if ($this->EE->db->table_exists('related_entries')) { // Convert Related Entries? $this->EE->table->add_row(lang('convert_related_entries', 'convert_related_entries_y') . '<br/>' . lang('convert_related_entries_info'), form_radio('convert_related_entries', 'y', FALSE, 'id="convert_related_entries_y"') . NL . lang('yes', 'convert_related_entries_y') . NBS . NBS . NBS . NBS . NBS . NL . form_radio('convert_related_entries', 'n', TRUE, 'id="convert_related_entries_n"') . NL . lang('no', 'convert_related_entries_n')); } return $this->EE->table->generate(); }
<?php if ($ranks) { ?> <h1><?php echo $this->lang->line('seo_rank_tracker_followed_ranks'); ?> <a id="refresh-ranks" href="#"><?php echo $this->lang->line('seo_rank_tracker_refresh_now'); ?> </a></h1> <div id="ranks"> <?php $table = new CI_Table(); $table->set_template($cp_table_template); $table->set_heading("#", $this->lang->line('seo_rank_tracker_keywords'), $this->lang->line('seo_rank_tracker_rank'), $this->lang->line('seo_rank_tracker_search_engine'), $this->lang->line('seo_rank_tracker_date'), $this->lang->line('seo_rank_tracker_delete')); $i = 1; foreach ($ranks as $r) { if ($r->rank == 0) { $table->add_row('<span class="nb">' . $i . '</span>', $r->history_link, '<span class="rank">' . "Not in top 100" . '</span>', $search_engines[$r->search_engine][0], '<span class="date">' . strftime("%Y-%m-%d à %H:%M:%S", $r->date) . '</span>', $r->delete_link); } else { $table->add_row('<span class="nb">' . $i . '</span>', $r->history_link, '<span class="rank">' . $r->rank . '</span>', $search_engines[$r->search_engine][0], '<span class="date">' . strftime("%Y-%m-%d à %H:%M:%S", $r->date) . '</span>', $r->delete_link); } /* if($r->rank == 0) { $table = myAddRow($table, $i, '<a href="'.$r->details_url.'">'.$r->keywords.'</a>', "Not in top 100", strftime("%d/%m/%Y %H:%M:%S",$r->date), '<a href="'.BASE.AMP.'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module=seo'.AMP.'method=rank_tracker_ajax'.AMP.'rank_id='.$r->id.'" class="refresh-rank">Refresh Now</a>'); } else { $table = myAddRow($table, $i, '<a href="'.$r->details_url.'">'.$r->keywords.'</a>', $r->rank, strftime("%d/%m/%Y %H:%M:%S",$r->date), '<a href="'.BASE.AMP.'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module=seo'.AMP.'method=rank_tracker_ajax'.AMP.'rank_id='.$r->id.'" class="refresh-rank">Refresh Now</a>'); } */
$html .= '<script type="text/javascript" src="modules/restapi/assets/js/views/logs.js"></script>'; $html .= '<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />'; $html .= '<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script>'; $html .= '<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js" type="text/javascript"></script>'; if (!$logs) { $html .= _('No Data Found!'); echo $html; exit; } $table = new CI_Table(); //set some classes for more controll in this table $table->set_template(array('table_open' => '<table id="log_table_parent">', 'row_start' => '<tr class="hover">')); $table->set_heading('', _('ID'), _('Time') . '<span class="localtime" data-done-text="' . _('Localized') . '"> (' . _('Localizing...') . ')</span>', _('Token'), _('Signature'), _('IP'), _('Server')); //iterate over log entires foreach ($logs as $l) { $log = isset($log) ? false : true; $table->add_row('<span class="show_event" data-id="' . $l['id'] . '">+</span>', $l['id'], '<span class="log_raw_time" data-date="' . $l['time'] . '">' . date('Y-m-d H:i:s', $l['time']) . '</span>', '<span class="hashtr">' . $l['token'] . '</span>', '<span class="hashtr">' . $l['signature'] . '</span>', $l['ip'], '<span class="hashtr">' . $l['server'] . '</span>'); //iterate over events, if we have any if (isset($l['events']) && $l['events']) { $eTable = new CI_Table(); $eTable->set_template(array('table_open' => '<table id="log_table_events">')); foreach ($l['events'] as $e) { $eTable->set_heading(_('Time'), _('Event'), _('Data') . '<span class="datahelp"> (' . _('click on data to expand') . ')</span>'); $eTable->add_row('<span class="log_raw_time" data-date="' . $e['time'] . '">' . date('Y-m-d H:i:s', $e['time']) . '</span>', '<span class="log_event" title="' . $e['trigger'] . '">' . $e['event'] . '</span>', '<div class="event_data" data-state="closed"><pre>' . print_r($e['data'], true) . '</pre></div>'); } $table->add_row(array('data' => $eTable->generate(), 'colspan' => 10, 'class' => 'log_events event' . $e['e_id'])); } } $html .= $table->generate(); $html .= '<script type="text/javascript">' . 'SyntaxHighlighter.autoloader("php http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js");' . 'SyntaxHighlighter.defaults["toolbar"] = false;' . 'SyntaxHighlighter.defaults["gutter"] = false;' . 'SyntaxHighlighter.all();</script>'; echo $html;
$hostnameno = form_radio($hostnameno) . form_label(_('No'), 'hostnameno'); $label = fpbx_label(_('Append Hostname'), _('Appends the hostname to the name of the log files')); $table->add_row($label, '<span class="radioset">' . $hostnameyes . $hostnameno . '</radioset>'); //queue log $queuelogyes = array('name' => 'queue_log', 'id' => 'queuelogyes', 'value' => 'yes', 'checked' => $queue_log == 'yes'); $queuelogyes = form_radio($queuelogyes) . form_label(_('Yes'), 'queuelogyes'); $queuelogno = array('name' => 'queue_log', 'id' => 'queuelogno', 'value' => 'no', 'checked' => $queue_log == 'no'); $queuelogno = form_radio($queuelogno) . form_label(_('No'), 'queuelogno'); $label = fpbx_label(_('Log Queues'), _('Log queue events to a file')); $table->add_row($label, '<span class="radioset">' . $queuelogyes . $queuelogno . '</radioset>'); $html .= $table->generate(); $html .= br(2); //log files $html .= heading(_('Log Files'), 5) . '<hr style="width:50%: margin-left: 0; margin-right: 50%">'; $table = new CI_Table(); $table->set_template(array('table_open' => '<table class="alt_table" id="logfile_entries">')); //draw table header with help on every option $has_security_option = version_compare($amp_conf['ASTVERSION'], '11.0', 'ge'); $heading = array(fpbx_label(_('File Name'), _('Name of file, relative to TODO!!!!. Use absolute path for a different location')), fpbx_label(_('Debug'), 'debug: ' . _('Messages used for debuging. ' . 'Do not report these as error\'s unless you have a ' . 'specific issue that you are attempting to debug. ' . 'Also note that Debug messages are also very verbose ' . 'and can and do fill up logfiles (and disk storage) quickly.')), fpbx_label(_('DTMF'), 'dtmf: ' . _('Keypresses as understood by asterisk. Usefull for debuging IVR and VM issues.')), fpbx_label(_('Error'), 'error: ' . _('Critical errors and issues')), fpbx_label(_('Fax'), 'fax: ' . _('Transmition and receiving of faxes')), fpbx_label(_('Notice'), 'notice: ' . _('Messages of specific actions, such as a phone registration or call completion')), fpbx_label(_('Verbose'), 'verbose: ' . _('Step-by-step messages of every step of a call flow. ' . 'Always enable and review if calls dont flow as expected')), fpbx_label(_('Warning'), 'warning: ' . _('Possible issues with dialplan syntaxt or call flow, but not critical.'))); if ($has_security_option) { $heading[] = fpbx_label(_('Security'), 'security: ' . _('Notification of security related events such as authentication attempts.')); } $heading[] = fpbx_label(_('Delete')); $table->set_heading($heading); //actual log files $count = 0; //$logfiles[] = array('name' => 'test', 'debug' => 'off', 'dtmf' => 'off', 'error' => 'on', 'fax' => 'off', 'notice' => 'on', 'verbose' => 'on', 'warning' => 'on'); foreach ($logfiles as $l) { $row[] = form_input(array('name' => 'logfiles[name][]', 'value' => $l['name'], 'placeholder' => _('file path/name'), 'required' => '')); $onoff = array('on' => _('On'), 'off' => _('Off')); $row[] = form_dropdown('logfiles[debug][]', $onoff, $l['debug']);
<?php $table = new CI_Table(); $table->set_template(array('table_open' => '<table class="table table-striped alt_table IVREntries" id="ivr_entries">')); //build header $h = array(); foreach ($headers as $mod => $header) { $h += $header; } $table->set_heading($h); $count = 0; foreach ($entries as $e) { $count++; //add ext to dial $row[] = form_input(array('name' => 'entries[ext][]', 'value' => $e['selection'], 'placeholder' => _('digits pressed'))); //add destination. The last one gets a different count so that we can manipualte it on the page if ($count == count($entries)) { $row[] = drawselects($e['dest'], 'DESTID', $restrict_mods, false) . form_hidden('entries[goto][]', ''); } else { $row[] = drawselects($e['dest'], $count, $restrict_mods, false) . form_hidden('entries[goto][]', ''); } //return to ivr $row[] = ' <span class="radioset"> <input type="radio" name="entries[ivr_ret][DESTID' . $count . ']" id="entries' . $count . 'DESTIDyes" value="1" ' . ($e['ivr_ret'] ? "CHECKED" : "") . '> <label for="entries' . $count . 'DESTIDyes">' . _("Yes") . '</label> <input type="radio" name="entries[ivr_ret][DESTID' . $count . ']" id="entries' . $count . 'DESTIDno" value="" ' . ($e['ivr_ret'] ? "" : "CHECKED") . '> <label for="entries' . $count . 'DESTIDno">' . _("No") . '</label> </span> '; //delete buttom