Month List ----------------------------------------------------> private static $monthArray = array("01"=>"January", "02"=>"February", "03"=>"March", "04"=>"April", "05"=>"May", "06"=>"June", "07"=>"July", "08"=>"August", "09"=>"September", "10"=>"October", "11"=>"November", "12"=>"December"); // print month list static function getMonthList($listName = "", $id="", $width = 250){ print self::createList(self::$monthArray,$listName,$id,$width,"Month",false); } Hour and Minute?List ----------------------------------------------------> private static $hourListArray =array(); private static $minuteListArray =array(); // print Issue Number static function getHourList($listName = "", $id="", $width = 250){ for ($i = 1; $i<=23; $i++){ $i = str_pad($i, 2, "0", STR_PAD_LEFT); self::$hourListArray[$i] = $i; } print self::createList(self::$hourListArray,$listName,$id,$width,"Hour",false); } static function getMinuteList($listName = "", $id="", $width = 250){ for ($i = 1; $i<=59; $i++){ $i = str_pad($i, 2, "0", STR_PAD_LEFT); self::$minuteListArray[$i] = $i; } print self::createList(self::$minuteListArray,$listName,$id,$width,"Min",false); }
Random number in mysql
For generating a random number between any two numbers we can use below code
update gurtestimonials set testrating = 5 – FLOOR( RAND( ) * ( 5 -4 +1 ) );
maxnum-FLOOR( RAND( ) * ( maxnum?-minnum +1 ) );
Thumbnail Image
Use createthumb111() function for Thumbnail Image.
This is new modified function. createthumb11() creating error on server
Auto Fill (auto search)
Two files important for it 1 -?jquery-ui.css 2-jquery-ui.min.js you can get these two files in?gabrielli admin js,css //////////////////////////////// css code??////////////////////////////////////////////////////// <style> .ui-autocomplete { max-height:400px; max-width: 375px; overflow-y: auto; overflow-x: hidden; padding-right: 20px; font: 11px Verdana, sans-serif; } .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus{ color:inherit; border:1px solid gray; background:#E4E4E4; } /* IE 6 doesn't support max-height * we use height instead, but this forces the menu to always be this tall */ * html .ui-autocomplete { height: 400px; } </style> ///////////////////////////// End Css ////////////////////////////////////////////////////////// /////////////////////////////// Jquery //////////////////////////////////////////////////////// $(document).ready(function() { /////////////////////// Auto complete search /////////////////////////////////// $(".model").live("focus", function() { //alert(frontend_url+"auto_complete_search.php"); var id = $(this).parent().parent().attr('id'); $(".model").autocomplete({ source: frontend_url+"admin_auto_complete_search.php", delay: 0, minLength:3, select: function (event, ui) { var productNameUrl = ui.item.value; var productId = ui.item.id; var is_flag = (ui.item.flag); if(is_flag){ $(this).val(ui.item.sku); $("#"+id).children().children('.description').val(ui.item.p_name); //$(this).parent.child(".description").val(ui.item.p_name); } } }); }); }); //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////// End Jquery ////////////////////////////////////////////////// /////////////////////////////////// Php code ///////////////////////////////////////////////// <tr id="row_<?=$i;?>"> <td><input type="text" name="model[]" class="model" /><td> <td><input type="text" name="description[]" class="description" /><td> <td><input type="text" name="quantity[]" /><td> <td><input type="text" name="price[]" /><td> <td><?=number_format(0,2);?><td> </tr> /////////////////////////////////////// End php code ////////////////////////////////////////
County, Town Create Update Delete
Some critical things to search in projects, important links important code etc
- Print a report can be found latest in: ??http://englishtestuk.com/admin/order/index?page=view
- Captcha change code is added first in the project:?http://englishtestuk.com/register
- Grouping of records based on a field and multiple checkbox update is done in exluk?View
- Image max size fix has bee done in this shopping cart View
- Image merge on the Fly while upload with other image – ?we have done in doyouwork View
- Social media sharing buttons?http://kurtnoble.com/labs/rrssb/index.html
- List of unicode characters?https://en.wikipedia.org/wiki/List_of_Unicode_characters
When insert in database through more request addslashes issue
foreach($_REQUEST as $key=>$val){ //skip those fields for which we have used fck editor if($key !="content") $_REQUEST[$key] = stripslashes(mysql_real_escape_string(str_replace("'", "'", str_replace("&", "&", $val)))); }
Footer
<div id="copyright_content"> <span>©<?php echo date('Y') ?> Store All rights reserved</span></br> <span>©<a style="color:#666" target="_blank" href="http://www.web-alliance.co.uk">Website Design & Programming by Web Alliance</a></span> </div>
Border shedding & shadow
<style> .order_detail_wrapper{ padding: 9px; border: 1px solid #BBB; width: 201px; min-height: 141px; height: auto; margin: 2px; box-shadow: 1px 2px 9px #999; } </style>
Image bulk uploader
If there is any error in bulk image uploader then see this file http://mssbuildingsupplies.co.uk/ $upload_directory = $_SERVER['DOCUMENT_ROOT']."/images/".$_GET['action']."/";