Month hour and minute listing


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);
}

&nbsp;

&nbsp;

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 ////////////////////////////////////////

Some critical things to search in projects, important links important code etc

  1. Print a report can be found latest in: ??http://englishtestuk.com/admin/order/index?page=view
  2. Captcha change code is added first in the project:?http://englishtestuk.com/register
  3. Grouping of records based on a field and multiple checkbox update is done in exluk?View
  4. Image max size fix has bee done in this shopping cart View
  5. Image merge on the Fly while upload with other image – ?we have done in doyouwork View
  6. Social media sharing buttons?http://kurtnoble.com/labs/rrssb/index.html
  7. List of unicode characters?https://en.wikipedia.org/wiki/List_of_Unicode_characters

Footer

 <div id="copyright_content">
               <span>&#169;<?php echo date('Y') ?> Store All rights reserved</span></br>
               <span>&#169;<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']."/";