Example #1
0
function get_tool($tool, $id, $mode = 0)
{
    $ci =& get_instance();
    switch ($tool) {
        case 'edit_allow':
            return $mode == '1' ? anchor(get_currcontroller() . '/vedit/' . $id, img('public/img/icons/edit_inline.gif'), 'title="' . lang('EDIT_TOOL') . '"') : anchor(get_currcontroller() . '/edit/' . $id, img('public/img/icons/edit_inline.gif'), 'title="' . lang('EDIT_TOOL') . '"');
            break;
        case 'details_allow':
            return $mode == '1' ? anchor(get_currcontroller() . '/vdetails/' . $id, img('public/img/icons/view_inline.gif'), 'title="' . lang('DETAILS_TOOL') . '"') : anchor(get_currcontroller() . '/details/' . $id, img('public/img/icons/view_inline.gif'), 'title="' . lang('DETAILS_TOOL') . '"');
            break;
        case 'move_allow':
            return $mode == '1' ? anchor(get_currcontroller() . '/vmove/' . $id, img('public/img/icons/move_inline.gif'), 'title="' . lang('MOVE_TOOL') . '"') : anchor(get_currcontroller() . '/move/' . $id, img('public/img/icons/move_inline.gif'), 'title="' . lang('MOVE_TOOL') . '"');
            break;
    }
    return null;
}
Example #2
0
 private function create()
 {
     $data = array();
     $this->set_validation();
     $data['title'] = lang('CONSTANTS_TITLE_CREATE');
     $data['orid'] = $this->get_orid();
     $data['success'] = null;
     if ($this->form_validation->run() === True) {
         if ($rid = $this->constants_model->create_record()) {
             $this->session->set_flashdata('success', True);
             redirect(get_currcontroller() . "/edit/{$rid}", 'refresh');
             return;
         } else {
             $data['success'] = false;
         }
     }
     $data['content'] = $this->load->view('constants/create', $data, True);
     return $this->load->view('layouts/main_layout', $data);
 }
Example #3
0
 private function create()
 {
     $data = array();
     $this->form_validation->set_rules('name', lang('NAME'), 'required|trim|callback_check_unique_name');
     $this->form_validation->set_rules('descr', lang('DESCR'), 'trim|max_length[512]');
     $this->form_validation->set_rules('archive', lang('ARCHIVE'), 'trim');
     $data['title'] = lang('POSITIONS_TITLE_CREATE');
     $data['orid'] = $this->get_orid();
     $data['success'] = null;
     if ($this->form_validation->run() === True) {
         if ($rid = $this->positions_model->create_record()) {
             $this->session->set_flashdata('success', True);
             redirect(get_currcontroller() . "/edit/{$rid}", 'refresh');
             return;
         } else {
             $data['success'] = false;
         }
     }
     $data['content'] = $this->load->view('positions/create', $data, True);
     return $this->load->view('layouts/main_layout', $data);
 }
Example #4
0
<div class="column span-4">
	<?php 
echo form_label(lang('CIF'), 'cif');
?>
</div>
<div class="column span-20 last">
	<?php 
echo form_textarea('cif', set_value('cif', ''), 'class="text part-5" id="cif" style="width: 200px;height:40px;"');
?>
</div>
<div class="column span-4">
	<?php 
echo form_label(lang('TOUR_NUM'), 'tour_num');
?>
</div>
<div class="column span-20 last">
	<?php 
echo form_input('tour_num', set_value('tour_num', ''), 'class="text part-2" id="tour_num"');
?>
</div>	
	
<div class="column span-4">
	<b><?php 
echo form_label(lang('APPROVE_TOUR'), 'approve');
?>
</b>
</div>
<div class="column span-8">
	<?php 
echo form_checkbox('approve', 1, set_value('approve', '') == 1, 'id="approve"');
?>
Example #5
0
	<?php 
echo form_input('item_name', set_value('item_name', ''), 'id="item_name" class="text part-5"');
?>
</div>
<div class="column span-4">
	<?php 
echo form_label(lang('PARENT'), 'parent');
?>
</div>
<div class="column span-8 last" id="menu_tree">
	<?php 
echo build_tree_dropdown(set_value('_positions_rid', ''));
?>
</div>
<div class="column span-4">
	<?php 
echo form_label(lang('ORDER'), 'item_order');
?>
</div>
<div class="column span-20 last">
	<?php 
echo form_input('item_order', set_value('item_order', ''), 'id="item_order" class="text part"');
?>
</div>
<div class="column span-4">
	<?php 
echo form_label(lang('DESCR'), 'descr');
?>
</div>
<div class="column span-8">
	<?php 
Example #6
0
	 * 
	 * @access public
	 * @return unknown_type
	 */
    public function get_tools()
    {
        return $this->menu->get_rights();
    }
    /**
	 * Set sort rule
	 * 
	 * Save sortrule into session for current object using it's identifier
	 * 
	 * @access protected
	 * @return void
	 */
    protected function sort()
Example #7
0
             $data['success'] = false;
         }
         $data['ds'] = $this->touroperators_model->get_edit($rid);
     }
     $data['content'] = $this->load->view('standart/move', $data, True);
     return $this->load->view('layouts/main_layout', $data);
 }
 /* Операции для Value Picker */
 private function vcreate()
 {
     $data = array();
     $this->set_validation();
     $this->form_validation->set_rules('descr', lang('DESCR'), 'trim|max_length[512]');
     $this->form_validation->set_rules('archive', lang('ARCHIVE'), 'trim');
     $data['title'] = lang('TOUROPERATORS_TITLE_CREATE');
     $data['orid'] = $this->get_orid();
     $data['success'] = null;
     if ($this->form_validation->run() === True) {
         if ($rid = $this->touroperators_model->create_record()) {
             $this->session->set_flashdata('success', True);
             redirect(get_currcontroller() . "/vedit/{$rid}", 'refresh');
Example #8
0
<div class="container findform">
<?php 
echo form_open(get_currcontroller() . "/find/go", array('id' => 'find_' . $orid, 'autocomplete' => 'off'));
echo form_hidden('obj_rid', $orid);
?>
<div class="column span-3">
	<h6><?php 
echo lang('SEARCH_TITLE');
?>
</h6>
</div>
<div class="column span-10">
	<?php 
echo form_label(lang('NAME'), 'interests_name');
?>
	<br>
	<?php 
echo form_input('interests_name', element('_interests.interests_name', $search, ''), 'id="interests_name" class="text part-5"');
?>
</div>
<div class="column span-11 last">
	<?php 
echo form_label(lang('HIDE_ARCHIVE'), 'archive');
?>
	<br>
	<?php 
echo form_dropdown('archive', array(1 => lang('NO'), 0 => lang('YES')), element('_interests.archive', $search, ''), 'id="archive" class="text"');
?>
</div>
<?php 
echo form_close();
Example #9
0
             $data['success'] = false;
         }
         $data['ds'] = $this->advertisescompanies_model->get_edit($rid);
     }
     $data['content'] = $this->load->view('standart/move', $data, True);
     return $this->load->view('layouts/main_layout', $data);
 }
 /* Операции для Value Picker */
 private function vcreate()
 {
     $data = array();
     $this->set_validation();
     $data['title'] = lang('ADVERTISESCOMPANIES_TITLE_CREATE');
     $data['orid'] = $this->get_orid();
     $data['success'] = null;
     if ($this->form_validation->run() === True) {
         if ($rid = $this->advertisescompanies_model->create_record()) {
             $this->session->set_flashdata('success', True);
             redirect(get_currcontroller() . "/vedit/{$rid}", 'refresh');
Example #10
0
					type: 'POST',
					url: "<?php 
echo site_url(get_currcontroller() . "/gccontr/go");
?>
",
					data: query_string,
					success: function(html){
						$('#credit_contragent').html(html);
						return;
					} 
				});
			});
			$('#c_type_debet').change(function(){
				var query_string = 'c_type_debet='+$('#c_type_debet').val();
				$.ajax({
					type: 'POST',
					url: "<?php 
echo site_url(get_currcontroller() . "/gdcontr/go");
?>
",
					data: query_string,
					success: function(html){
						$('#debet_contragent').html(html);
						return;
					} 
				});
			});
		}
)	
</script>
Example #11
0
<span style="font-weight: normal;"><?php 
echo $p_descr;
?>
</span>
&nbsp;&nbsp;&nbsp;<span style="font-weight: normal;"><?php 
echo lang('PAGER_SHOW');
echo form_dropdown('p_limit', array_combine(explode('|', $this->config->item('crm_grid_limits')), explode('|', $this->config->item('crm_grid_limits'))), $this->config->item('crm_grid_limit'), 'onchange="javascript: window.location.replace(\'' . site_url(get_currcontroller()) . '/limit/\'+$(this).val()+\'' . ($vp ? '/' . $this->uri->assoc_to_uri($this->a_uri_assoc) : '') . '\');"');
?>
</span>
&nbsp;&nbsp;&nbsp;
<?if(!empty($pagination)) { ?>
|&nbsp;&nbsp;&nbsp;
<?php 
echo $pagination;
?>
<? } ?>
Example #12
0
 protected function sort()
 {
     if (!($rid = element('doc_rid', $this->a_uri_assoc, null))) {
         show_404();
     }
     if (!$this->finjournal_model->check_document($rid)) {
         show_404();
     }
     $field = element('sort', $this->a_uri_assoc, null);
     if ($field) {
         $sort = array('c' => $field, 'r' => 'ASC');
         if ($oldSort = $this->get_session('sort')) {
             if ($oldSort['c'] == $field) {
                 $sort['r'] = $oldSort['r'] == 'ASC' ? 'DESC' : 'ASC';
             }
         }
         $this->set_session('sort', $sort);
     }
     redirect(get_currcontroller() . "/journal/{$rid}", 'refresh');
     return;
 }
Example #13
0
?>
</div>
<div class="column span-12 bbordered">
	<b><?php 
echo lang('AREA_FROM');
?>
</b>
</div>
<div class="column span-12 bbordered last">
	<b><?php 
echo lang('AREA_TO');
?>
</b>
</div>
<div class="column span-4">
	<?php 
echo form_label(lang('COUNTRY_FROM') . required_field(), '_countries_rid_from');
?>
 
</div>
<div class="column span-8">
	<?php 
echo form_dropdown('_countries_rid_from', get_countries_list(), set_value('_countries_rid_from', ''), 'id="_countries_rid_from" class="text" ');
?>
</div>
<div class="column span-4">
	<?php 
echo form_label(lang('COUNTRY_TO') . required_field(), '_countries_rid_to');
?>
 
</div>
Example #14
0
			<? } ?>
		</td>
		<?}?>
		<td class="gridHeader">
			&nbsp;
		</td>
	</tr>
	<?$num_records = count($ds); $counter = 0; foreach($ds as $record) { $counter++;?>
	<tr class="dataRow<?php 
echo $counter == $num_records ? ' last_row' : '';
?>
" ondblclick="javascript:window.location = '<?if(element('edit_allow', $tools, null)) { ?><?php 
echo site_url(get_currcontroller() . '/edit/' . $record->rid);
?>
<?}else{?><?php 
echo site_url(get_currcontroller() . '/details/' . $record->rid);
?>
<?}?>';">
		<?if(element('delete_allow', $tools, null)) { ?>
		<td>
			<input type="checkbox" name="row[]" value="<?php 
echo $record->rid;
?>
" id="crow_<?php 
echo $record->rid;
?>
">
		</td>
		<? } ?>
		<?foreach($fields as $key=>$field) {?>
		<td style="<?php 
Example #15
0
					type: 'POST',
					url: "<?php 
echo site_url(get_currcontroller() . "/recalc/go");
?>
",
					data: query_string,
					success: function(val){
						$('#sum').val(val);
						return;
					} 
				});
			});
			/* -- } Value picker --*/
			new AjaxUpload('upload_btn', {
				action: '<?php 
echo site_url(get_currcontroller() . "/addattach/go");
?>
',
				onSubmit: function() {
					this.setData({_documents_rid : "<?php 
echo $ds->rid;
?>
", upload_descr:$('#upload_descr').val()});
				},
				onComplete: function(file, response) {
					$('#attaches').html(response);
					return;
				}
			});
		}
)	
Example #16
0
<h3><?php 
echo lang('NEW_TASK');
?>
</h3>
<?if(validation_errors()){?>
<div class="error">
	<?php 
echo validation_errors('<div>', '</div>');
?>
</div>	
<?}?>
<?php 
echo form_open(get_currcontroller() . "/tasks/add", array('id' => 'create_' . $objrid, 'autocomplete' => 'off'));
echo form_hidden('objrid', $objrid);
?>
<div class="column span-3">
<?php 
echo form_label(lang('DATE_TASK'), 'edate');
?>
 <font color="red">*</font>
</div>
<div class="column span-9">
<?php 
echo form_input('edate', set_value('edate', ''), 'id="edate_obj" class="text" readonly="readonly" style="width:90px;"');
?>
<script type="text/javascript">
	$('#edate_obj').datepick({showOn: 'button', yearRange: '-60:+0',
    buttonImageOnly: true, buttonImage: '<?php 
echo base_url();
?>
public/js/jquery.datapick.package-3.6.1/calendar.gif'});
Example #17
0
     $data['jtp'] = $this->jtp;
     $data['tools'] = $this->get_tools();
     $data['ds'] = $this->filials_model->get_ds();
     $data['paging'] = $this->get_paging($this->filials_model->get_calc_rows(), True);
     $content = $this->load->view('standart/vgrid', $data, True);
     $this->load->view('layouts/valuepicker_layout', array('content' => $content));
     return;
 }
 private function vcreate()
 {
     $data = array();
     $this->form_validation->set_rules('code', lang('CODE'), 'required|trim|callback_check_unique_code');
     $this->form_validation->set_rules('name', lang('NAME'), 'required|trim|callback_check_unique_name');
     $this->form_validation->set_rules('adress', lang('ADRESS'), 'required|trim|min_length[5]');
     $this->form_validation->set_rules('phones', lang('PHONES'), 'required|trim|min_length[5]');
     $this->form_validation->set_rules('fax', lang('FAX'), 'trim');
     $this->form_validation->set_rules('email', lang('EMAIL'), 'required|trim|valid_email');
     $this->form_validation->set_rules('mobile_phones', lang('MPHONES'), 'trim');
     $this->form_validation->set_rules('_cities_rid', lang('CITY'), 'required|trim');
     $this->form_validation->set_rules('descr', lang('DESCR'), 'trim|max_length[512]');
     $this->form_validation->set_rules('archive', lang('ARCHIVE'), 'trim');
     $data['title'] = lang('FILIALS_TITLE_CREATE');
     $data['orid'] = $this->get_orid();
     $data['success'] = null;
     if ($this->form_validation->run() === True) {
         if ($rid = $this->filials_model->create_record()) {
             $this->session->set_flashdata('success', True);
             redirect(get_currcontroller() . "/vedit/{$rid}", 'refresh');
Example #18
0
		</td>
	</tr>
	<tr>
		<td class="gridHeader" style="padding-left: 2px; white-space: nowrap;">
			<?if(element('delete_allow', $tools, null)) { ?>
				<input type="checkbox" name="all" id="call" value="1">
			<? } ?> 
		</td>
		<?foreach($fields as $key=>$field) { ?>
		<td class="gridHeader" width="<?php 
echo element('colwidth', $field, '');
?>
" style="white-space: nowrap;">
			<? if($field['sort']) { ?>
			<?php 
echo anchor(get_currcontroller() . '/sort/' . $key . '/doc_rid/' . $doc_rid, $field['label'], "title=\"" . $field['label'] . "\"");
?>
			&nbsp;&nbsp;&nbsp;
			<? if(element('c', $sort, null)==$key) { ?>
				<? if(element('r', $sort, null)=='ASC') { ?>
					<?php 
echo img('public/css/images/icons/arrow_down.gif');
?>
				<? } else {?>
					<?php 
echo img('public/css/images/icons/arrow_up.gif');
?>
				<? } ?>
			<? } else {?>
				<?php 
echo img('public/css/images/icons/arrow.gif');
Example #19
0
				});
				return true;
				}
				return false;
			}
			
			function prop(){
				var dataStr = 'rows_action=prop&sum='+$('#sum').val()+'&'+$("input[name='f_sum']").serialize()+'&'+$("input[name='_filials_rid']").serialize()+'&'+$("input[name='f_rid[]']").serialize()+'&'+$("input[name='row_sum[]']").serialize();
				if(confirm('<?php 
echo lang('CONFIRM_PROP');
?>
')){
				$.ajax({
					type: "POST",
					url: "<?php 
echo site_url(get_currcontroller() . "/prop/go");
?>
",
					data: dataStr,
					success: function(msg){
						$('#rows_body').html(msg);
					}
				});
				return true;
				}
				return false;
			}

			$('#add_row').click(function(){ 
				addrow(); 
			});
Example #20
0
<h3><?php 
echo lang('EDIT_TASK');
?>
</h3>
<?if(validation_errors()){?>
<div class="error">
	<?php 
echo validation_errors('<div>', '</div>');
?>
</div>	
<?}?>
<?php 
echo form_open(get_currcontroller() . "/tasks/edit/rid/{$ds->rid}", array('id' => 'edit_' . $ds->rid, 'autocomplete' => 'off'));
echo form_hidden('rid', $ds->rid);
?>
<div class="column span-3">
<?php 
echo form_label(lang('DATE_TASK'), 'edate');
?>
 <font color="red">*</font>
</div>
<div class="column span-9">
<?php 
echo form_input('edate', set_value('edate', $ds->edate), 'id="edate_obj" class="text" readonly="readonly" style="width:90px;"');
?>
<script type="text/javascript">
	$('#edate_obj').datepick({showOn: 'button', yearRange: '-60:+0',
    buttonImageOnly: true, buttonImage: '<?php 
echo base_url();
?>
public/js/jquery.datapick.package-3.6.1/calendar.gif'});
Example #21
0
echo form_label(lang('DESCR'), 'descr');
?>
</div>
<div class="column span-8">
	<?php 
echo form_textarea('descr', set_value('descr', $ds->descr), 'id="descr" class="text" readonly="readonly" style="width:200px; height: 50px;"');
?>
</div>
<div class="column span-4">
	<?php 
echo form_label(lang('ARCHIVE'), 'archive');
?>
</div>
<div class="column span-8 last">
	<?php 
echo form_dropdown('archive', array('0' => lang('NO'), '1' => lang('YES')), set_value('archive', $ds->archive), 'id="archive" class="text" readonly="readonly"');
?>
</div>

</div>
<div class="column span-24 last">
	<input type="reset" value="<?php 
echo lang('CANCEL');
?>
" class="button" onclick="window.location='<?php 
echo site_url(get_currcontroller() . '/journal/' . $ds->_documents_rid);
?>
';" id="reset" name="reset">
</div>

</div>
Example #22
0
?>
</div>
<div class="column span-20 last">
	<?php 
echo form_dropdown('archive', array('0' => lang('NO'), '1' => lang('YES')), set_value('archive', $ds->archive), 'id="archive" class="text" readonly="readonly"');
?>
</div>

<div class="column span-4">
	<?php 
echo form_label(lang('DESCR'), 'descr');
?>
</div>
<div class="column span-20 last">
	<?php 
echo form_textarea('descr', set_value('descr', $ds->descr), 'id="descr" class="text" readonly="readonly" style="width:200px; height: 50px;"');
?>
</div>

</div>
<div class="column span-24 last controls">
	<input type="reset" value="<?php 
echo lang('CANCEL');
?>
" class="button" onclick="window.location='<?php 
echo site_url(get_currcontroller());
?>
';" id="reset" name="reset">
</div>

</div>
Example #23
0
echo form_label(lang('ARCHIVE'), 'archive');
?>
</div>
<div class="column span-8 last">
	<?php 
echo form_dropdown('archive', array('0' => lang('NO'), '1' => lang('YES')), set_value('archive', $ds->archive), 'id="archive" class="text" readonly="readonly"');
?>
</div>

</div>
<div class="column span-24 last">
	<input type="reset" value="<?php 
echo lang('CANCEL');
?>
" class="button" onclick="window.location='<?php 
echo site_url(get_currcontroller() . '/vdetails/go/');
?>
';" id="reset" name="reset">
	<button onclick="joinToParent('<?php 
echo $ds->{$jtp}['val'];
?>
', '<?php 
echo $ds->{$jtp}['scr'];
?>
')" class="button"><?php 
echo lang('SELECT');
?>
</button>
</div>

</div>
Example #24
0
echo form_label(lang('DESCR'), 'descr');
?>
</div>
<div class="column span-20 last">
	<?php 
echo form_textarea('descr', set_value('descr', $ds->descr), 'id="descr" class="text" readonly="readonly" style="width:200px; height: 50px;"');
?>
</div>

</div>
<div class="column span-24 last">
	<input type="reset" value="<?php 
echo lang('CANCEL');
?>
" class="button" onclick="window.location='<?php 
echo site_url(get_currcontroller() . '/vjournal/go/');
?>
';" id="reset" name="reset">
	<button onclick="joinToParent('<?php 
echo $ds->{$jtp}['val'];
?>
', '<?php 
echo $ds->{$jtp}['scr'];
?>
')" class="button"><?php 
echo lang('SELECT');
?>
</button>
</div>

</div>
Example #25
0
		</td>
	</tr>
	<tr>
		<?if(element('delete_allow', $tools, null)) { ?>
		<td class="gridHeader" style="padding-left: 2px; white-space: nowrap;">
				<input type="checkbox" name="all" id="call" value="1">
		</td>
		<? } ?> 
		<?foreach($fields as $key=>$field) { ?>
		<td class="gridHeader" width="<?php 
echo element('colwidth', $field, '');
?>
" style="white-space: nowrap;">
			<? if($field['sort']) { ?>
			<?php 
echo anchor(get_currcontroller() . '/vsort/' . $key, $field['label'], "title=\"" . $field['label'] . "\"");
?>
			&nbsp;&nbsp;&nbsp;
			<? if(element('c', $sort, null)==$key) { ?>
				<? if(element('r', $sort, null)=='ASC') { ?>
					<?php 
echo img('public/css/images/icons/arrow_down.gif');
?>
				<? } else {?>
					<?php 
echo img('public/css/images/icons/arrow_up.gif');
?>
				<? } ?>
			<? } else {?>
				<?php 
echo img('public/css/images/icons/arrow.gif');