array ( 'class' => 'form-horizontal row-border', 'name' =>'fileinfo' ); echo form_open_multipart(current_url(),$attributes); //if there are errors if(isset($errors)) { echo error_template($errors); } if(isset($success)) { echo success_template($success); } ?> <div class="form-group"> <label class="col-sm-3 control-label">Upload Cover image</label> <div class="col-sm-9"> <?php $data = array ( 'name' => 'userfile', 'id' => 'userfile', 'value' => set_value('userfile'), 'maxlength' => '', 'size' => '',
function cadastro_entries() { if (FrontUser::isLoggedIn()) { return success_template(); } return form_template(); }
array ( 'class' => 'form-horizontal row-border', 'name' =>'fileinfo' ); echo form_open_multipart(current_url(),$attributes); //if there are errors if(isset($errors)) { echo error_template($errors); } if(isset($success)) { echo success_template('Image was successfully uploaded <a class="btn btn-sm btn-primary" href="'.current_url().'">Refresh page</a>'); } ?> <input type="hidden" name="user_id" value="<?=$user_id?>" class="form-control" id="user_id" > <div class="form-group"> <label class="col-md-2 control-label"></label> <div class="col-md-10"> <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"><img src="<?=base_url().'uploads/avatars/'.get_thumbnail($avatar)?>"></div> <?php $data = array ( 'name' => 'userfile',
$attributes = array ( 'class' => 'form-horizontal row-border', 'name' => 'fileinfo' ); echo form_open_multipart(current_url(), $attributes); //if there are errors if (isset($errors)) { echo error_template($errors); } if (isset($success)) { echo success_template('Upload successful'); } ?> <input type="hidden" name="id" value="<?= $id ?>" class="form-control" id="user_id"> <div class="form-group"> <div class="col-sm-9"> <div class="fileinput fileinput-new" data-provides="fileinput"> <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"> <?php //if there is an image if (get_about_us_article_info_by_id($id, 'image')) {
?> <a class="btn ink-reaction btn-floating-action btn-primary" href="<?= base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) ?>/add_footer_link"><i class="fa fa-plus"></i></a> <?php } ?> </p> <?php if (isset($success_msg)) { echo success_template($success_msg); } if (isset($error_msg)) { echo error_template($error_msg); } ?> <div class="table-responsive"> <table class="table datatable"> <thead> <tr> <th>Title</th> <th>URL</th> <th>Logo</th> </tr>
* Time: 10:51 AM */ ?> <?php //if there are any errors if(isset($errors)) { echo error_template($errors); } //if it a success elseif(isset($success)) { echo success_template('Email was sent'); } $attributes = array ( 'class' => 'form-horizontal', 'id' => 'myform' ); echo form_open(current_url(), $attributes); ?> <div class="form-group"> <label for="prf_name" class="col-sm-3 control-label">To</label> <div class="col-sm-6">
'class' => 'form-horizontal row-border', 'name' =>'fileinfo' ); echo form_open_multipart(current_url(),$attributes); //if there are errors if(isset($errors)) { echo error_template($errors); } if(isset($success)) { echo success_template('<p>Reply was successfully sent</p>'); } ?> <div class="form-group"> <div class="col-sm-12"> Message<br> <textarea name="content" id="usr_msg" class="form-control ckeditor message2" ></textarea> </div> </div>
function logo_settings() { if (check_my_access('view_site_info')) { if ($this->input->post('ajax')) { $str = ''; switch ($this->input->post('ajax')) { case 'logo_dimensions': //print_array($_POST); $this->form_validation->set_rules($this->site_logo_m->validate_dimensions); $str = ''; if ($this->form_validation->run() == FALSE) { $str .= error_template(validation_errors()); } else { $info = array('width' => $this->input->post('logo_width'), 'height' => $this->input->post('logo_height')); //check if thetre is info $logo_info = $this->site_logo_m->get_all(); if (count($logo_info)) { //then update based on id foreach ($logo_info as $row) { if ($this->site_logo_m->update($row['id'], $info, 'You updated site logo info')) { $str .= success_template('Site logo dimensions have been successfully Updated'); } else { $str .= info_template('No change was made'); } } } else { //insert if ($this->site_logo_m->create($info, 'You updated the site logo info')) { $str .= success_template('Site logo dimensions have been successfully added'); } } } echo $str; break; } echo $str; } else { $data['main_content'] = 'admin/settings/logo_home_v'; $data['pagetitle'] = 'Logo Settings'; $data['logo_info'] = $this->site_logo_m->get_all(); if ($this->input->post('upload')) { //if a file is being uploaded if ($_FILES and $_FILES['userfile']['name']) { //check if there is already a logo if ($this->site_logo_m->get_all()) { //delete it foreach ($this->site_logo_m->get_all() as $row) { unlink('uploads/site_logo/' . get_thumbnail($row['logo_name'])); unlink('uploads/site_logo/' . $row['logo_name']); } } $image_name = $this->site_logo_m->do_upload('site_logo'); // Upload the file if (!$this->upload->display_errors()) { //save file name $image_data = array('logo_name' => $image_name); //print_array($_POST); //check if there is already a logo if ($data['logo_info']) { //do update foreach ($this->site_logo_m->get_all() as $row) { //save file info if ($this->site_logo_m->update($row['id'], $image_data, 'updated site logo ')) { $data['success'] = 'Site logo successfully updated <a class="btn btn-success btn-sx" href="' . current_url() . '">Refresh</a>'; } else { $data['errors'] = 'File was not saved. Please try again'; } } } else { //save file info if ($this->site_logo_m->create($image_data, 'updated site logo ')) { $data['success'] = 'Site logo successfully updated <a class="btn btn-success btn-xs" href="' . current_url() . '">Refresh</a>'; } else { $data['errors'] = 'File was not saved. Please try again'; } } } else { $data['errors'] = $this->upload->display_errors(); } } else { $data['errors'] = 'Upload an image'; } } //load the admin dashboard view $this->load->view('admin/includes/admin_template', $data); } } else { load_access_denied_page(); } }