'.$new_image_name.'
'.$source_image_name); /* $hd = fopen('test.txt','w'); fwrite($hd,$source_image_path.'thumbs/'.$new_image_name.$source_image_name); fclose($hd);*/ $size = getimagesize($source_path.$source_image_name); $w = $size[0]; $h = $size[1]; if($h>$w) { $fixed_dim = 'width'; } else if($h<$w) { $fixed_dim = 'height'; } else { $fixed_dim = 'auto'; } $config['image_library'] = 'GD2'; $config['source_image'] = $source_path.$source_image_name; $config['create_thumb'] = false; $config['maintain_ratio'] = true; $config['master_dim']=$fixed_dim; $config['quality'] = '100%'; $config['new_image'] = $source_path.$dest_name.$source_image_name; $config['width'] = $rw; $config['height'] = $rh; $CI->load->library('image_lib', $config); $CI->image_lib->initialize($config); if ( ! $CI->image_lib->resize()) { echo $CI->image_lib->display_errors(); } if($crop==true) { $size = getimagesize($source_path.$dest_name.$source_image_name); $w = $size[0]; $h = $size[1]; switch($name_ext) { case 'gif': $simg = imagecreatefromgif($source_path.$dest_name.$source_image_name); break; case 'jpg': $simg = imagecreatefromjpeg($source_path.$dest_name.$source_image_name); break; case 'JPG': $simg = imagecreatefromjpeg($source_path.$dest_name.$source_image_name); break; case 'png': $simg = imagecreatefrompng($source_path.$dest_name.$source_image_name); break; case 'jpeg': $simg = imagecreatefromjpeg($source_path.$dest_name.$source_image_name); break; } $dimg = imagecreatetruecolor($nw, $nh); $wm = $w/$nw; $hm = $h/$nh; $h_height = $nh/2; $w_height = $nw/2; imagecopyresampled($dimg,$simg,0,0,0,0,$nw,$nh,$w,$h); /* if($w> $h) { $adjusted_width = $w / $hm; $half_width = $adjusted_width / 2; $int_width = $half_width - $w_height; imagecopyresampled($dimg,$simg,-$int_width,0,0,0,$adjusted_width,$nh,$w,$h); } elseif(($w <$h) || ($w == $h)) { $adjusted_height = $h / $wm; $half_height = $adjusted_height / 2; $int_height = $half_height - $h_height; imagecopyresampled($dimg,$simg,0,-$int_height,0,0,$nw,$adjusted_height,$w,$h); } else {*/ //imagecopyresampled($dimg,$simg,0,0,0,0,$nw,$nh,$w,$h); /*}*/ imagejpeg($dimg,$source_path.$dest_name.$source_image_name,100); } } function resize_crop_image($nw,$nh,$source_path,$source_image_name,$dest_name,$name_ext,$crop=true) { $CI = &get_instance(); //echo($source_image_path.'
'.$new_image_name.'
'.$source_image_name); /* $hd = fopen('test.txt','w'); fwrite($hd,$source_image_path.'thumbs/'.$new_image_name.$source_image_name); fclose($hd);*/ $size = getimagesize($source_path.$source_image_name); $w = $size[0]; $h = $size[1]; if($h>$w) { $fixed_dim = 'width'; } else if($h<$w) { $fixed_dim = 'height'; } else { $fixed_dim = 'auto'; } $config['image_library'] = 'GD2'; $config['source_image'] = $source_path.$source_image_name; $config['create_thumb'] = false; $config['maintain_ratio'] = TRUE; $config['master_dim']=$fixed_dim; $config['quality'] = '100%'; $config['new_image'] = $source_path.$dest_name.$source_image_name; $config['width'] = $nw; $config['height'] = $nh; $CI->load->library('image_lib', $config); $CI->image_lib->initialize($config); if ( ! $CI->image_lib->resize()) { echo $CI->image_lib->display_errors(); } if($crop==true) { $size = getimagesize($source_path.$dest_name.$source_image_name); $w = $size[0]; $h = $size[1]; switch($name_ext) { case 'gif': $simg = imagecreatefromgif($source_path.$dest_name.$source_image_name); break; case 'jpg': $simg = imagecreatefromjpeg($source_path.$dest_name.$source_image_name); break; case 'JPG': $simg = imagecreatefromjpeg($source_path.$dest_name.$source_image_name); break; case 'png': $simg = imagecreatefrompng($source_path.$dest_name.$source_image_name); break; case 'jpeg': $simg = imagecreatefromjpeg($source_path.$dest_name.$source_image_name); break; } $dimg = imagecreatetruecolor($nw, $nh); $wm = $w/$nw; $hm = $h/$nh; $h_height = $nh/2; $w_height = $nw/2; imagecopyresampled($dimg,$simg,0,0,0,0,$nw,$nh,$w,$h); /* if($w> $h) { $adjusted_width = $w / $hm; $half_width = $adjusted_width / 2; $int_width = $half_width - $w_height; imagecopyresampled($dimg,$simg,-$int_width,0,0,0,$adjusted_width,$nh,$w,$h); } elseif(($w <$h) || ($w == $h)) { $adjusted_height = $h / $wm; $half_height = $adjusted_height / 2; $int_height = $half_height - $h_height; imagecopyresampled($dimg,$simg,0,-$int_height,0,0,$nw,$adjusted_height,$w,$h); } else {*/ //imagecopyresampled($dimg,$simg,0,0,0,0,$nw,$nh,$w,$h); /*}*/ imagejpeg($dimg,$source_path.$dest_name.$source_image_name,100); } } ?>

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 284

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Cannot change session cookie parameters when headers already sent

Filename: Session/Session.php

Line Number: 296

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 306

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 316

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 317

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 318

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 319

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 377

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Cannot change save handler when headers already sent

Filename: Session/Session.php

Line Number: 110

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Cannot start session when headers already sent

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/naalidada/domains/nayyaralidada.net/public_html/application/controllers/Main.php
Line: 9
Function: __construct

File: /home/naalidada/domains/nayyaralidada.net/public_html/index.php
Line: 318
Function: require_once

Nayyar Ali Dada & Associatess
common_model->select_where_ASC_DESC( '*','tbl_album',array('recid >'=>0),'rank','ASC' ); if($projects->num_rows() > 0) { $i=1; $is=1; foreach($projects->result() as $project){ echo $i."-".$project->albumname."
"; $data11['products_id'] = $project->recid; $data11['prod_name'] = $project->albumname; $data11['prod_item_no'] = $project->imagecss; $data11['prod_desc'] = $project->ntext; $data11['prod_url'] = SEF_URLS($project->albumname); $data11['prod_title'] = $project->albumname; $data11['prod_descp'] = $project->albumname; $data11['prod_keyword'] = $project->projectloc; $data11['products_sort'] = $project->rank; $data11['products_img'] = $project->nimg; $data11['products_img2'] = $project->nimg2; $data11['products_status'] = 1; $data11['cat_id'] = $project->sizeid; $this->common_model->insert_array('products',$data11); $projects_images = $this->common_model->select_where_ASC_DESC( '*','tbl_news33',array('recid >'=>0,'nlink2'=>$project->recid),'rank','ASC' ); if($projects_images->num_rows() > 0) { foreach($projects_images->result() as $projects_image){ $data12['prod_id'] = $projects_image->nlink2; $data12['prod_image'] = $projects_image->nimg; $data12['prod_sort'] = $projects_image->rank; $data12['prod_sketch'] = $projects_image->proj; $data12['prod_image2'] = $projects_image->nimg2; $this->common_model->insert_array('product_images',$data12); $is++; } } $i++; } }*/ /*$awards = $this->common_model->select_where_ASC_DESC( '*','tbl_news2',array('recid >'=>0),'rank','ASC' ); if($awards->num_rows() > 0) { $i=1; foreach($awards->result() as $award){ $data13['brand_name'] = $award->ntitle; $data13['brand_details'] = $award->news; $data13['brand_sort'] = $award->rank; $data13['brand_id'] = $award->recid; $data13['brand_status'] = 1; $data13['brand_image'] = ""; $data13['lngid'] = "en"; $this->common_model->insert_array('brands',$data13); } }*/ ?>

Stay Home, Stay Safe