This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Controller | |
--------------------------- | |
if ( !empty($_FILES['gallery_images']['name'] )) | |
{ | |
$gallery_images = $this->Gallery_model->uploadImage('gallery_images','gallery_images','gif|jpg|png',1); | |
$attachment = $gallery_images['file_name']; | |
if ( $gallery_images['file_name'] == '' ) | |
{ | |
$this->session->set_flashdata('FlsMsg',$this->alert->danger($gallery_images['upload_error'])); | |
redirect( 'Gallery/gallery_form' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Html Code | |
---------------------------------- | |
<div class="showpreloadimage"> | |
<img id="showimageurl1" width="100%"> | |
</div> | |
<input type="file" class="filestyle" name="team_image" data-placeholder="No file" id="postimage1" onchange="upload_teamimage(this)" tabindex="-1" style="position: absolute; clip: rect(0px 0px 0px 0px);"> | |
<div class="bootstrap-filestyle input-group"> | |
<input type="text" class="form-control " placeholder="No file" disabled=""> | |
<span class="group-span-filestyle input-group-btn" tabindex="0"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function save_football() | |
{ | |
$login_info = $this->session->userdata('login_info'); | |
if ($login_info['logged_in'] == 1 && $login_info['user_details']['status'] == 1): | |
$this->form_validation->set_error_delimiters($this->alert->dmStart(), $this->alert->dmEnd()); | |
$data = array('required' => 'Please write %s'); | |
$this->form_validation->set_rules('team_name', 'team name', 'trim|required', $data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$hometeam = $this->input->post('home_team'); | |
$awayteam = $this->input->post('away_team'); | |
if( $hometeam == $awayteam ) : | |
$this->session->set_flashdata('FlsMsgCheckteam', $this->alert->danger('please selete proper home team and away team')); | |
$id = $this->uri->segment(3); | |
$leagueid = $this->uri->segment(4); | |
redirect(base_url()."football/update_matchform/".$id.'/'.$leagueid); | |
endif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//absolute path to wp-load.php, or relative to this script | |
//e.g., ../wp-core/wp-load.php | |
include( 'trunk/wp-load.php' ); | |
//grab the WPDB database object, using WP's database | |
//more info: http://codex.wordpress.org/Class_Reference/wpdb | |
global $wpdb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you're facing permission problems while running your project in a browser, creating a controller, using Composer, or adjusting configurations, this method can assist in resolving your issues. | |
sudo chmod -R 777 storage/ | |
sudo chmod -R 777 bootstrap/cache | |
./vendor/bin/sail bash | |
cd .. | |
chown -R sail:sail html |