Exemple #1
0
function getNext($input)
{
    $next = $input;
    do {
        $next = increment($next);
        while (($validLen = strcspn($next, 'iol')) !== strlen($next)) {
            $next = increment(substr($next, 0, $validLen + 1)) . substr($next, $validLen + 1);
        }
    } while (!isValid($next));
    return $next;
}
Exemple #2
0
function increment($input, $position)
{
    global $firstLetter, $lastLetter;
    if ($position < 0) {
        return $input;
    }
    $char = ord(substr($input, $position, 1));
    if ($char == $lastLetter) {
        $input = substr_replace($input, chr($firstLetter), $position, 1);
        return increment($input, $position - 1);
    } else {
        return substr_replace($input, chr($char + 1), $position, 1);
    }
}
Exemple #3
0
function GetPage($res, $increment)
{
    if ($res[id] == '') {
        $hid_id = increment(client);
        $hid_contract_id = increment(client_contract);
    } else {
        $hid_id = $res[id];
        $hid_contract_id = $res[id];
    }
    $image = $res['image'];
    if (empty($image)) {
        $image = '0.jpg';
    } else {
        $disable_img = 'disabled';
    }
    if ($res[invoice] == 1) {
        $inv_check = "checked";
    } else {
        $inv_check = "";
    }
    if ($res[report_invoice] == 1) {
        $report_check = "checked";
    } else {
        $report_check = "";
    }
    if ($res[taking_over_act] == 1) {
        $taking_check = "checked";
    } else {
        $taking_check = "";
    }
    $data .= '
	<div id="tabs1" style="width: auto; height: 557px;">
		<ul>
		<li><a href="#tab-0">მთავარი</a></li>
		<li><a href="#tab-1">პროექტი</a></li>
		</ul>
	<div id="tab-0">
	<div id="dialog-form">
	    <div style="width: 609px;  float: left;">
	    <fieldset>
	       <legend>ძირითადი ინფორმაცია</legend>
			<table>
			<tr>
			<td>
	       <table>
	    		<tr>
					<td id="img_colum">
						<img style="margin-left: 5px;" width="105" height="105" id="upload_img" src="media/uploads/file/' . $image . '" />
					</td>
				</tr>
				<tr>
					<td id="act">
						<span>
							<a href="#" onclick="view_image(' . $res[image_id] . ')" class="complate">View</a> | <a href="#" id="delete_image" image_id="' . $res[image_id] . '" class="delete">Delete</a>
						</span>
					</td>
				</tr>
				</tr>
					<td>
						<div style="margin-top:10px; width: 127px; margin-left: -5px;" class="file-uploader">
							<input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
							<button id="choose_button' . $disable_img . '" class="center" >აირჩიეთ ფაილი</button>
						</div>
					</td>
				</tr>
			</table>
			</td>
			<td>
	       <table class="dialog-form-table">
	           <tr>
	               <td colspan="2"><label for="incomming_cat_1">საიდენტიფიკაციო კოდი</label></td>
	           </tr>
	           <tr>
	                <td>
						<input type="text" id="identity_code" style="width: 300px;" value="' . $res['identity_code'] . '"/>
					</td>
				    <td>
						<button style="float:right;" id="client_check" style="width: 60px;">შეამოწმე</button>
					</td>
				</tr>
	           <tr>
	               <td colspan="2"><label for="incomming_cat_1_1">დასახელება</label></td>
	           </tr>
	           <tr>
	               <td colspan="2"><input id="client_name" style="resize: vertical;width: 415px;" value="' . $res['name'] . '"/></td>
	           </tr>
	           <tr>
	               <td colspan="2"><label for="incomming_cat_1_1_1">იურიდიული მისამართი</label></td>
    	       </tr>
	           <tr>
	               <td colspan="2"><input id="jurid_address" type="text" style="width: 415px;" value="' . $res['juridical_address'] . '"/></td>
    	       </tr>
	       		<tr>
	               <td colspan="2"><label for="incomming_comment">ფაქტიური მისამართი</label></td>
	           </tr>
	           <tr>
	               <td colspan="2"><input id="fact_address" style="resize: vertical;width: 415px;" value="' . $res['physical_address'] . '"/></td>
	           </tr>
	       </table>
			 </td> 
			</tr>
			
			</table>
	                   </fieldset>
	                   <fieldset>
	                   <legend>საკონტაქტო პირები</legend>
	    	<div class="" style="width:587px;">           
	            <div id="button_area">
                    <button id="add_client">დამატება</button>
					<button id="delete_client">წაშლა</button>
                </div>
				<table class="display" id="table_client" style="width: 100%;">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 50%;">სახელი</th>
                            <th style="width: 50%;">გვარი</th>
                            <th style="width: 50%;">თანამდებობა</th>
                            <th style="width: 50%;">მობილური</th>
							<th style="width: 50%;">ელ ფოსტა</th>
							<th style="width: 25px;" class="check">&nbsp;</th>
                        </tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                        	   <input type="text" name="search_id" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                            	<input type="text" name="search_number" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
							<th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
	               			<th>
				            	<div class="callapp_checkbox">
				                    <input type="checkbox" id="check-all-client" name="check-all" />
				                    <label style="margin-top: 3px;" for="check-all-client"></label>
				                </div>
				            </th>
                        </tr>
                    </thead>
                </table>
	            </div>
	                  
         </fieldset>
	                   </div>
	    
	    
        <div id="side_menu" style="float: left;height: 495px;width: 80px;margin-left: 10px; background: #272727; color: #FFF;margin-top: 6px;">
	       <spam class="info" style="display: block;padding: 10px 5px;  cursor: pointer;" onclick="show_right_side(\'info\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/info.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">კონტრაქტი</div></spam>
	       <spam class="task" style="display: block;padding: 10px 5px;  cursor: pointer;" onclick="show_right_side(\'task\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/task.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">დოკუმენტი</div></spam>
	   
	    </div>
	    
	    <div style="width: 445px;float: left;margin-left: 10px;" id="right_side">
            <fieldset style="display:none;" id="info">
                <legend>კონტრაქტი</legend>
	            <span style="margin-right: 5px; margin-top: 50px;" class="hide_said_menu">x</span>
                <div id="pers">
	               	<table class="margin_top_10">
                            <tr>
                                <td style="width: 230px;"><label for="client_person_phone1">ხელშეკრულების ნომერი</label></td>
        	                    <td><label for="client_person_phone2">გაფორმების თარიღი</label></td>
                            </tr>
    	                    <tr>
                                <td><input style="margin-top: 10px;" id="contract_number" type="text" value="' . $res[number] . '"></td>
        	                    <td><input style="margin-top: 10px;" id="add_date" type="text" value="' . $res[create_date] . '"></td>
                            </tr>
    	                    <tr>
        	                    <td colspan="2"><label style="margin-left: 135px; margin-top: 20px;" for="client_person_mail2">მოქმედების პერიოდი</label></td>
                            </tr>
    	                    <tr>
                                <td><input style="margin-top: 10px;" id="contract_start_date" type="text" value="' . $res[validity_period_start] . '">
									
								</td>
        	                    <td><input style="margin-top: 10px;" id="contract_end_date" type="text" value="' . $res[validity_period_end] . '"></td>
                            </tr>
	                        <tr>
                                <td><label style="margin-top: 20px;" for="client_person_addres2">ხელშეკრულების ღირებულება</label></td>
        	                    <td><label style=" margin-top: 20px;" for="client_person_phone2">საანგარიშო პერიოდი</label></td>
                            </tr>
    	                    <tr>
									<td>
										<td>
											<input style="margin-top: 10px; width: 129px; margin-left: -231px;" id="contract_price" type="text" value="' . $res[price] . '">
										</td>
										<td>
											<label style="margin-left: -292px; margin-top: 16px;">-ლარი</label>
										</td>
									</td>
									<td>
										<td>
											<select style="margin-top: 10px; width: 50px; margin-left: -200px;"  id="angarish_period">' . Get_reporting_period_count($res[reporting_period_count]) . '</select>
										</td>
		        	                    <td>
											<select style="margin-top: 10px; width: 106px; margin-left: -133px;"  id="angarish_period1">' . Get_reporting_period_type($res[reporting_period_type]) . '</select>
										</td>
									</td>
							</tr>
							<tr>
								<td colspan="2">
									' . show_file($res) . '
								</td>
							</tr>				
                        </table>
				 </div>
				
			</fieldset>
    	    <fieldset style="display:none; width: 436px;" id="task">
                <legend>დოკუმენტი</legend>
	            <span style="margin-right: 5px; margin-top: 50px;" class="hide_said_menu">x</span>
	            <table>
	               <tr>
						<td><input type="checkbox" id="invois" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="1" style="display: inline; margin-left: 20px; margin-top: -5px; width: 16px;" ' . $inv_check . '/></td>
	                    <td><label>ინვოისი</label></td>
	               </tr>
				   <tr>
						<td><input type="checkbox" id="migeba_chabareba" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="1" style="display: inline; margin-left: 20px; margin-top: 14px; width: 16px;" ' . $taking_check . '/></td>
	                    <td><label style="margin-top: 20px;">მიღება-ჩაბარების აქტი</label></td>
	               </tr>
			       <tr>
						<td><input type="checkbox" id="angarishfaqtura" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="1" style="display: inline; margin-left: 20px; margin-top: 14px; width: 16px;" ' . $report_check . '/></td>
	                    <td><label style="margin-top: 20px;">ანგარიშ-ფაქტურა</label></td>
	               </tr>
	            </table>
            </fieldset>
        </div>
	</div>
	</div>
	<div id="tab-1">
	
	<div class="margin_top_10">           
	            <div id="button_area">
                    <button id="add_project">დამატება</button>
					<button id="delete_project">წაშლა</button>
                </div>
				<table class="display" id="table_project" style="width: 100%;">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 50%;">დასახელება</th>
                            <th style="width: 50%;">ტიპი</th>
                            <th style="width: 50%;">შექმნის თარიღი</th>
                            <th style="width: 50%;">ნომრები</th>
							<th style="width: 25px;" class="check">&nbsp;</th>
                        </tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                        	   <input type="text" name="search_id" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
                            <th>
                            	<input type="text" name="search_number" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
							<th>
				            	<div class="callapp_checkbox">
				                    <input type="checkbox" id="check-all-project" name="check-all" />
				                    <label style="margin-top: 3px;" for="check-all-project"></label>
				                </div>
				            </th>
                        </tr>
                    </thead>
                </table>
	        </div>
	</div>
	</div>
	
	<input type="hidden" value="' . $res[id] . '" id="hidden_id">
	<input type="hidden" value="' . $hid_id . '" id="hidden_client_id">
	<input type="hidden" value="' . $hid_contract_id . '" id="hidden_clientcontract_id">';
    return $data;
}
function GetPage($res = '', $number)
{
    $num = 0;
    if ($res[phone] == "") {
        $num = $number;
    } else {
        $num = $res[phone];
    }
    if ($res[id] != '') {
        $dis = 'disabled="disabled"';
    } else {
        $dis = '';
    }
    if ($res['category_parent_id'] != '') {
        $cat_ch = $res['category_parent_id'];
    }
    $increm = mysql_query("\tSELECT  `name`,\r\n\t\t\t\t\t\t\t\t\t`rand_name`\r\n\t\t\t\t\t\t\tFROM \t`file`\r\n\t\t\t\t\t\t\tWHERE   `incomming_call_id` = {$res['id']}\r\n\t\t\t");
    $call_date = date('Y-m-d H:i:s');
    $data .= '
	<!-- jQuery Dialog -->
    <div id="add-edit-goods-form" title="საქონელი">
    	<!-- aJax -->
	</div>
	<div id="dialog-form">
			<div style="float: left; width: 673px;">	
				<fieldset >
			    	<legend>ძირითადი ინფორმაცია</legend>
		
			    	<table width="100%" class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="id">მომართვა №</label></td>
							<td style="width: 180px !important;"><label for="call_date">თარიღი</label></td>
							<td style="width: 180px;"><label for="call_phone">ტელეფონი</label></td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField user_id\'" value="' . ($res['id'] != '' ? $res['id'] : increment("incomming_call")) . '" disabled="disabled" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="call_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField date\'" value="' . ($res['call_date'] != "" ? $res['call_date'] : $call_date) . '" disabled="disabled" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="call_phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . ($res['call_phone'] != "" ? $res['call_phone'] : $num) . '" />
							</td>
							<td style="width: 69px;">
								<button id="button_calls" class="calls">ნომრები</button>
							</td>
						</tr>
						<tr>
							<td style="width: 180px;"><label for="category_parent_id">კატეგორია</label></td>
							<td style="width: 180px;"><label for="category_id">ზარის ტიპი</label></td>
							<td colspan="2"><label for="sub_category">ქვე-კატეგოტია</label></td>
							
						</tr>
						<tr>
							<td style="width: 180px;"><select id="category_parent_id" class="idls object">' . Getcategory($res['category_parent_id']) . '</select></td>
							<td style="width: 180px;"><select id="category_id" class="idls object">' . Getcategory1($res['category_parent_id'], $res['category_id']) . '</select></td>
							<td colspan="2"><select id="sub_category" style="width: 258px;" class="idls object">' . Getcategory2($res['category_id'], $res['sub_category']) . '</select>  </td>
							
						</tr>
					</table>

		    <table width="100%" class="dialog-form-table">
						<tr>
							<td style="width: 183px;"><label for="call_problem_date">პრობლემის თარიღი</label></td>
							<td style="width: 184px;"><label for="call_status">ინფორმაციის წყარო</label></td>
							<td style="width: 180px;"><label for="call_object_id">ბიზნეს ცენტრი</label></td>						
						</tr>
						<tr>	
							<td> <input type="text" id="call_problem_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['call_problem_date'] . '" /></td>
							<td style="width: 180px;"><select id="call_source_id" class="idls object">' . Getsource($res['call_source_id']) . '</select></td>
							<td colspan="2"><select  style="width: 258px;" id="call_object_id" class="idls object">' . Getobject($res['call_object_id']) . '</select></td>						
						</tr>
						<tr>
							<td style="width: 180px;"><label for="call_content">საუბრის შინაარსი</label></td>
						</tr>
						<tr>
							
							<td colspan="6">	
								<textarea  style="width: 641px; resize: none;" id="call_content" class="idle" name="call_content" cols="300" rows="4">' . $res['call_content'] . '</textarea>
							</td>
						</tr>			
					</table>
				</fieldset >
<!-------------------------------------------------------------------დავალება-------------------------------------------------------------------------->			   
				<fieldset style="margin-top: 5px;">
			    	<legend>დავალების ფორმირება</legend>
		
			    	<table class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="d_number">დავალების ტიპი</label></td>
							<td ><label for="d_number">განყოფილება</label></td>
							
						</tr>
			    		<tr>
							<td ><select  id="task_type_id" class="idls object">' . Gettask_type($res['task_type_id']) . '</select></td>
							<td ><select style="width: 465px;" id="task_department_id" class="idls object">' . Getdepartment($res['task_department_id']) . '</select></td>
						</tr>
					</table>		    
					<table class="dialog-form-table">
							    		    
						<tr>
							<td style="width: 500px;"><label for="d_number">პასუხისმგებელი პირი</label</td>	    
							<td style="width: 180px;"><label for="d_number">პრიორიტეტები</label></td>													
						</tr>
						<tr>
							<td ><select  style="width: 450px;" id="persons_id" class="idls object">' . Getpersons($res['persons_id']) . '</select></td>    
							<td style="width: 180px;"><select id="priority_id" class="idls object">' . Getpriority($res['priority_id']) . '</select></td>
						</tr>
					</table>
		        </fieldset>
			</div>
			<div>
				  </fieldset>
			</div>
			<div style="float: right;  width: 355px;">
					    
<!---------------------------------------------------------------კლიენტი---------------------------------------------------------------------------->							    
				 <fieldset onload="legal()">
					<legend>მომართვის ავტორი</legend>
					<table style="height: 172px;">
						<tr style="height:20px;">
							<td style="padding: 0px 0px 10px 45px;"><input type="radio" style="float:left;" class="legal" onclick="legal()" value="fhisical" name="legal" ' . ($res['abonent_status'] == "fhisical" ? "checked" : "checked") . '><span style="display: inline-block; margin: 8px;" >ფიზიკური </span></td>
							<td style="width: 180px; height:20px;"><input type="radio" style="float:left;" class="legal" onclick="legal()" value="Jural" name="legal" ' . ($res['abonent_status'] == "Jural" ? "checked" : "") . '><span style="display: inline-block; margin: 8px;">იურიდიული </td>
						</tr>
						<tr style="height:20px;">
							<td style="width: 180px; height:20px;">ტელეფონი</td>
							<td style="width: 180px; height:20px;"><div class="fhisical">პირადი ნომერი</div><div class="Jural">საიდენთიპიკაციო კოდი</div></td>
						</tr>	    
						<tr style="height:40px;">
							<td style="width: 180px; height:20px;"><input type="text" id="abonent_phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_phone'] . '" /></td>
                            <td style="width: 180px; height:20px;"><input type="text" id="abonent_pin" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_pin'] . '" /></td>
						</tr>
						<tr style="height:20px;">
							<td colspan="2" style="height:20px;"><div class="fhisical">აბონენტის სახელი გვარი</div><div class="Jural">ორგანიზაცია</div></td>
						</tr>
						<tr style="height:40px;">
							<td colspan="2" style="height:20px;">
								<input type="text" id="abonent_name" style="width: 328px;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_name'] . '" />
							</td>		
						</tr>
						<tr style="height:20px;" class="Jural">
							<td colspan="2" style="height:20px;">პასუხისმგებელი პირი</td>
						</tr>		    
						<tr style="height:40px;" class="Jural">
							<td colspan="2" style="height:20px;">
								<input type="text" id="abonent_responsibl_person" style="width: 328px;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_responsibl_person'] . '" />
							</td>		
						</tr>		    
						<tr style="height:20px;">
							<td colspan="2" style="height:20px;">მისამართი</td>
						</tr>
						<tr style="height:20px;">
							<td colspan="2" style="height:40px;">
								<input type="text" id="abonent_address" style="width: 328px;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_address'] . '" />
							</td>		
						</tr>
						<tr style="height:20px;">
							<td style="width: 180px;"></td>
							<td style="width: 180px;">აბონენტის ნომერი</td>
						</tr>	    
						<tr style="height:40px;">
							<td style="width: 180px;">შენიშვნა</td>
                            <td style="width: 180px;"><input type="text" id="abonent_number" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_number'] . '" /></td>
						</tr>
                        <tr style="height:40px;">
							<td colspan="2">
								<textarea type="text" id="abonent_coment" style="width: 328px;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" >' . $res['abonent_coment'] . '</textarea>
							</td>		
						</tr>        		    		    
						
					</table>
				</fieldset>
				';
    $data .= GetRecordingsSection($res);
    $data .= '		<fieldset>
					<legend>დამატებითი ინფორმაცია</legend> 
					<table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
					<tr>
						<td>
							<div class="file-uploader">
								<input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
								<button id="choose_button" class="center">აირჩიეთ ფაილი</button>
								<input id="hidden_inc" type="text" value="' . increment('incomming_call') . '" style="display: none;">
							</div>
						</td>
					</tr>
				</table>
			     <table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
			          <tr style="border-bottom: 1px solid #85b1de;">
			           <td colspan="3">მიმაგრებული ფაილი</td>
			          </tr>
				</table>
				<table id="file_div" style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">';
    while ($increm_row = mysql_fetch_assoc($increm)) {
        $data .= ' 
								        <tr style="border-bottom: 1px solid #85b1de;">
								          <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td>													 
								          <td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td>
								          <td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td>
								        </tr>';
    }
    $data .= '
	 		</table>
				</fieldset>
			</div>
	 		<input id="hidden_checker" type="text" value="' . $res['id'] . '" style="display: none;">
    </div>';
    return $data;
}
function apache_parse($options, $output)
{
    $result = array('Requests' => null, 'Bytes_sent' => null, 'Idle_workers' => null, 'Busy_workers' => null, 'CPU_Load' => null);
    # Mapping from Scoreboard statuses to friendly labels
    $scoreboard = array('_' => 'Waiting_for_connection', 'S' => 'Starting_up', 'R' => 'Reading_request', 'W' => 'Sending_reply', 'K' => 'Keepalive', 'D' => 'DNS_lookup', 'C' => 'Closing_connection', 'L' => 'Logging', 'G' => 'Gracefully_finishing', 'I' => 'Idle_cleanup', '.' => 'Open_slot');
    foreach ($scoreboard as $key => $val) {
        # These are not null, they are zero, when they aren't in the output.
        $result[$val] = 0;
    }
    # Mapping from line prefix to data item name
    $mapping = array("Total Accesses" => 'Requests', "Total kBytes" => 'Bytes_sent', "CPULoad" => 'CPU_Load', "BusyWorkers" => 'Busy_workers', "IdleWorkers" => 'Idle_workers');
    foreach (explode("\n", $output) as $line) {
        $words = explode(": ", $line);
        if ($words[0] == "Total kBytes") {
            $words[1] = big_multiply($words[1], 1024);
        }
        if (array_key_exists($words[0], $mapping)) {
            # Check for really small values indistinguishable from 0, but otherwise
            # just copy the value to the output.
            $result[$mapping[$words[0]]] = strstr($words[1], 'e') ? 0 : $words[1];
        } elseif ($words[0] == "Scoreboard") {
            $string = $words[1];
            $length = strlen($string);
            for ($i = 0; $i < $length; $i++) {
                increment($result, $scoreboard[$string[$i]], 1);
            }
        }
    }
    return $result;
}
Exemple #6
0
}
//$result = doSomething('foo', 'bar');
//var_dump($result);
function doSomethingElse($param, $anotherParam)
{
    return "{$param} {$anotherParam}";
}
$result = doSomethingElse('foo', 'bar');
//var_dump($result);
//scope
$a = 1;
function increment($a)
{
    $a++;
}
increment($a);
//var_dump($a);
$b = null;
if (true) {
    $b = 'foo';
}
//var_dump($b);
//by reference
$a = 1;
function incByRef(&$paramToBeIncremented)
{
    $paramToBeIncremented++;
}
incByRef($a);
//var_dump($a);
//func_get_args
Exemple #7
0
function GetPage($res = '', $number)
{
    $c_date = date('Y-m-d H:i:s');
    $num = 0;
    if ($res[phone] == "") {
        $num = $number;
    } else {
        $num = $res[phone];
    }
    $data .= '
	<!-- jQuery Dialog -->
    <div id="add-edit-goods-form" title="საქონელი">
    	<!-- aJax -->
	</div>
	<div id="dialog-form">
			<div style="float: left; width: 800px;">	
				<fieldset >
				<fieldset style="width:300px; float:left;">
			    	<legend>ძირითადი ინფორმაცია</legend>
		
			    	<table width="500px" class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="">მომართვა №</label></td>
							<td style="width: 180px;"><label for="">თარიღი <span style="color:red; font-weight: bold; font-size: 120%">*</span></label></td>
						</tr>							
						
						<tr>
							<td style="width: 180px;">
								<input type="text" id="id" class="idle" onblur="this.className=\'idle\'"  value="' . ($res['id'] != '' ? $res['id'] : increment('incomming_call')) . '" disabled="disabled" />
								<input style="display:none;" type="text" id="h_id" class="idle" onblur="this.className=\'idle\'"  value="' . $res['id'] . '" disabled="disabled" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="c_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField date\'" value="' . ($res['call_date'] != '' ? $res['call_date'] : $c_date) . '" disabled="disabled" />
							</td>				
						</tr>
						<tr>
							<td style="width: 180px;"><label for="phone">ტელეფონი <span style="color:red; font-weight: bold; font-size: 120%">*</span></label></td>							
							<td><label for="person_name">აბონენტის სახელი</label></td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="phone" class="idle" onblur="this.className=\'idle\'"  value="' . $num . '" />
							</td>
							<td style="width: 69px;">
								<input type="text" id="person_name" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['name'] . '" />
							</td>	
						</tr>
						<tr>
							<td>
								<label for="source_id">წყარო</label>
							</td>
							<td>
							</td>
						</tr>
						<tr>
							<td>
								<select style="width: 165px;" id="source_id" class="idls object">' . Getsource($res['source_id']) . '</select>
							</td>
							<td style="width: 69px;">
								<button class="calls">ნომრები</button>
							</td>
						</tr>				
					</table>
				</fieldset>
				<fieldset style="width:220px; float:left; margin-left:10px; height:75px;">
			    	<legend>მომართვის ავტორი</legend>
					<table id="" class="dialog-form-table" width="220px">						
						<tr>
							<td style="width: 220px;"><input style="float:left;" type="radio" name="x" value="1" checked><span style="margin-top:5px; display:block;">ფიზიკური</span></td>
					  		<td style="width: 220px;"><input style="float:left;" type="radio" name="x" value="2" ' . ($res['type'] == '2' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">იურიდიული</span></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:220px; float:left; margin-left:10px; height:85px;">
			    	<legend>ზარის შეფასება</legend>
					<table id="" class="dialog-form-table" width="220px">						
						<tr>
							<td style="width: 220px;"><input style="float:left;" type="radio" name="xx" value="1" ' . ($res['call_vote'] == '1' ? "checked" : "") . '><span style="margin-top:5px; display:block;">პოზიტიური</span></td>
					  		<td style="width: 220px;"><input style="float:left;" type="radio" name="xx" value="2" ' . ($res['call_vote'] == '2' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">ნეიტრალური</span></td>
					  	</tr>
					  	<tr>
					  		<td style="width: 220px;"><input style="float:left;" type="radio" name="xx" value="3" ' . ($res['call_vote'] == '3' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">ნეგატიური</span></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:752px; float:left;">
			    	<legend>ინფორმაცია</legend>
					<table id="" class="dialog-form-table" width="500px">
					  	<tr>
					  		<td><label for="information_category_id">კატეგორია</label></td>
					  	</tr>						
						<tr>
							<td><select style="width: 752px;" id="information_category_id" class="idls object">' . Getinformation_category($res['information_category_id']) . '</select></td>
						</tr>
						<tr>
					  		<td><label for="information_category_id">ქვე-კატეგორია</label></td>
					  	</tr>
						<tr>
							<td><select style="width: 752px;" id="information_sub_category_id" class="idls object">' . Getinformation_sub_category($res['information_sub_category_id'], $res['information_category_id']) . '</select></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:370px; float:left;">
			    	<legend>მომართვის შინაარსი</legend>
					<table id="" class="dialog-form-table" width="350px">		
						<tr>
							<td style="width: 370px;"><select style="width: 368px;" id="content_id" class="idls object">' . Getcontent($res['content_id']) . '</select></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:350px; float:left; margin-left:10px;">
			    	<legend>პროდუქტი</legend>
					<table id="" class="dialog-form-table" width="350px">		
						<tr>
							<td style="width: 350px;"><select style="width: 350px;" id="product_id" class="idls object">' . Getproduct($res['product_id']) . '</select></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:755px; float:left;">
			    	<legend>გადამისამართება</legend>
					<table id="" class="dialog-form-table" width="230px">		
						<tr>
							<td style="width: 570px;"><label for="d_number">ქვე-განყოფილება</label></td>
							<td><label style="margin-left: 35px;" for="d_number">კავშირი</label></td>
						</tr>
						<tr>
							<td style="width: 250px;"><select style=" width: 570px;" id="forward_id" class="idls object">' . Getforward($res['forward_id']) . '</select></td>
							<td><input style="margin-left: 35px;" type="checkbox" id="connect" value="1" ' . ($res['connect'] == '1' ? "checked" : "") . '></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:400px; float:left;">
			    	<legend>შედეგი <span style="color:red; font-weight: bold; font-size: 120%">*</span></legend>
					<table id="" class="dialog-form-table" width="150px">	
						<tr>
							<td><select style="width: 400px;" id="results_id" class="idls object">' . Getresults($res['results_id']) . '</select></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:315px; float:left; margin-left: 10px;">
			    	<legend>შედეგის კომენტარი <span style="color:red; font-weight: bold; font-size: 120%">*</span></legend>
					<table id="" class="dialog-form-table" width="150px">	
						<tr>
							<td><textarea  style="width:317px; resize: none;" id="results_comment" class="idle" name="content" cols="300" >' . $res['results_comment'] . '</textarea></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:557px; float:left;">
			    	<legend>კომენტარი <span style="color:red; font-weight: bold; font-size: 120%">*</span></legend>
					<table id="" class="dialog-form-table" width="150px">	
						<tr>
							<td><textarea  style="width: 750px; resize: none;" id="content" class="idle" name="content" cols="300" >' . $res['content'] . '</textarea></td>
						</tr>
					</table>
				</fieldset>
				';
    $data .= '
		   
				<fieldset style="margin-top: 5px;">
			    	<legend>დავალების ფორმირება</legend>
		
			    	<table class="dialog-form-table">
						<tr>
							<td style="width: 280px;"><label for="d_number">დავალების ტიპი</label></td>
							<td style="width: 280px;"><label for="d_number">სცენარი</label></td>
							<td style="width: 280px;"><label for="d_number">პრიორიტეტი</label></td>
						</tr>
			    		<tr>
							<td style="width: 280px;" id="task_type_change"><select style="width: 230px;" id="task_type_id" class="idls object">' . Gettask_type($res['task_type_id']) . '</select></td>
							<td style="width: 280px;"><select style="width: 230px;" id="task_department_id" class="idls object">' . Getdepartment($res['task_department_id']) . '</select></td>
							<td style="width: 280px;"><select style="width: 230px;" id="persons_id" class="idls object">' . Getpersons($res['persons_id']) . '</select></td>
						</tr>
						<tr>
							<td style="width: 150px;"><label for="content">კომენტარი</label></td>
							<td style="width: 150px;"><label for="content"></label></td>
							<td style="width: 150px;"><label for="content"></label></td>
						</tr>
						<tr>
							<td colspan="6">
								<textarea  style="width: 747px; resize: none;" id="comment" class="idle" name="content" cols="300" rows="2">' . $res['comment'] . '</textarea>
							</td>
						</tr>
					</table>
		        </fieldset>
			</div>
			<div>
				  </fieldset>
			</div>
			<div style="float: right;  width: 355px;">
				 <fieldset>
					<legend>მომართვის ავტორი <span style="color:red; font-weight: bold; font-size: 120%">*</span></legend>
					<table style="height: 243px;">						
						<tr>
							<td style="width: 180px; color: #3C7FB1;">ტელეფონი</td>
							<td style="width: 180px; color: #3C7FB1;">პირადი ნომერი</td>
						</tr>
						<tr>
							<td>
								<input type="text" id="personal_phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_phone'] . '" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="personal_id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_id'] . '" />
							</td>					
						</tr>
						<tr>
							<td style="width: 180px; color: #3C7FB1;">კონტრაგენტი</td>
							<td style="width: 180px; color: #3C7FB1;">ელ-ფოსტა</td>
						</tr>
						<tr >
							<td style="width: 180px;">
								<input type="text" id="personal_contragent" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_contragent'] . '" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="personal_mail" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_mail'] . '" />
							</td>			
						</tr>
						<tr>
							<td td style="width: 180px; color: #3C7FB1;">მისამართი</td>
							<td td style="width: 180px; color: #3C7FB1;">სტატუსი</td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="personal_addres" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_addres'] . '" />		
							</td>
							<td td style="width: 180px;">
								<input type="text" id="personal_status" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_status'] . '" />		
							</td>
						</tr>
					</table>
				</fieldset>';
    if (!empty($res[phone])) {
        $data .= GetRecordingsSection($res);
    }
    $data .= '</div>
			</div>
    </div>';
    return $data;
}
Exemple #8
0
function GetPage($res = '')
{
    $c_date = date('Y-m-d H:i:s');
    $data .= '<div id="dialog-form">
						<div style="float: left; width: 760px;">
							<fieldset >
						    	<legend>ძირითადი ინფორმაცია</legend>
					
						    	<table width="100%" class="dialog-form-table">
									<tr>
										<td style="width: 180px;"><label for="req_num">დავალების №</label></td>
										<td style="width: 180px;"><label for="req_num">შექმნის თარიღი</label></td>
										<td style="width: 180px;"><label for="req_data">შესრულების პერიოდი</label></td>
										<td style="width: 180px;"><label for="req_phone"></label></td>
									</tr>
									<tr>
										<td style="width: 150px;">
											<input style="width: 150px;" type="text" id="id" class="idle" onblur="this.className=\'idle\'"  value="' . ($res['id'] != '' ? $res['id'] : increment('task')) . '" />
										</td>
										<td style="width: 150px;">
											<input style="width: 150px;" type="text" id="cur_date" class="idle" onblur="this.className=\'idle\'"  value="' . ($res['date'] != '' ? $res['date'] : $c_date) . '" />
										</td>
										<td style="width: 200px;">
											<input style="float:left;" type="text" id="done_start_time" class="idle" onblur="this.className=\'idle\'" value="' . $res['start_date'] . '"  /><span style="float:left; margin-top:5px;">-დან</span>
										</td>
										<td style="width: 200px;">
											<input style="float:left;" type="text" id="done_end_time" class="idle" onblur="this.className=\'idle\'" value="' . $res['end_date'] . '" /><span style="float:left; margin-top:5px;">-მდე</span>
										</td>
									</tr>
								</table>
										
								<table width="100%" class="dialog-form-table">
								   <tr>
										<td style="width: 220px;">დავალების ტიპი</select></td>
									    <td style="width: 220px;">ქვე-განყოფილება</select></td>
										<td style="width: 220px;">პრიორიტეტი</select></td> 
									</tr>
									<tr>
										<td style="width: 220px;"><select style="width: 220px;" id="task_type_id" class="idls object">' . Gettask_type($res['task_type_id']) . '</select></td>
									    <td style="width: 220px;"><select style="width: 220px;" id="task_department_id" class="idls object">' . Getdepartment($res['department_id']) . '</select></td>
										<td style="width: 220px;"><select style="width: 217px;" id="priority_id" class="idls object">' . Getpersons($res['priority_id']) . '</select></td> 
									</tr>
								</table>
								
								<table width="100%" class="dialog-form-table" id="task_comment_table">
								   <tr>
										<td style="width: 220px;">დავალების შინაარსი</td>
									</tr>
									<tr>
										<td><textarea  style="width: 99%; resize: none; height: 50px;" id="task_comment" class="idle" name="task_comment" cols="300" >' . $res['comment'] . '</textarea></td>
									</tr>
								</table>
                            </fieldset>';
    //if (Gettask_type($res['task_type_id']) == 1 && Gettask_type($res['task_type_id']) == 2) {
    $data .= '<fieldset id="additional" class="hidden">
    							    	<legend>კლიენტთა ბაზა</legend>
    									<table width="100%" class="dialog-form-table">
    									    <tr>
                                                <td>სცენარი</td>
    											<!--td style="text-align: right;">ფაილის ატვირთვა</td-->
    					   						<td style="text-align: right;">სატელეფონო ბაზა</td>
    									   </tr>
    										<tr>
    											<td style="width: 200px;"><select style="width: 200px;" id="template_id" class="idls object">' . Getscenar($res['template_id']) . '</select></td>
    											<!--td style="width: 100px;">
    											    <div class="file-uploader">
    									               <input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
    									               <button style="margin-right: 0px !important;" id="choose_button" class="center">აირჩიეთ ფაილი</button>
    									            </div>
    											</td-->
    											<td style="width: 100px;"><button style="margin-right: 0px !important;" id="choose_base" class="center">აირჩიეთ ბაზა</button>	</td>
    										</tr>
        								</table>
    													
    									<div id="dt_example" class="inner-table">
    							        <div style="width:100%;" id="container" >        	
    							            <div id="dynamic">
    							            	<div id="button_area">
    							            		<!--button id="add_button_pp">დამატება</button-->
    						        			</div>
    							                <table class="" id="example4" style="width: 100%;">
    							                    <thead>
    													<tr  id="datatable_header">
    							                           <th style="display:none">ID</th>
    														<th style="width:4%;">#</th>
    														<th style="width:%; word-break:break-all;">პირადი №<br>საიდ. კოდი</th>
    														<th style="width:%; word-break:break-all;">დასახელება</th>
    														<th style="width:%; word-break:break-all;">ფიზ / იურ.<br> პირი</th>
    														<th style="width:%; word-break:break-all;">ტელეფონი</th>
    														<th style="width:%; word-break:break-all;">ელ-ფოსტა</th>
    														<th style="width:%; word-break:break-all;">მისამართი</th>
    													</tr>
    												</thead>
    												<thead>
    													<tr class="search_header">
    														<th class="colum_hidden">
    					                            			<input type="text" name="search_id" value="" class="search_init" style="width: 10px"/>
    					                            		</th>
    														<th>
    															<input style="width:100px;" type="text" name="search_overhead" value="ფილტრი" class="search_init" />
    														</th>
    														<th>
    															<input style="width:100px;" type="text" name="search_partner" value="ფილტრი" class="search_init" />
    														</th>
    													<th>
    															<input style="width:100px;" type="text" name="search_partner" value="ფილტრი" class="search_init" />
    														</th>
    													<th>
    															<input style="width:100px;" type="text" name="search_partner" value="ფილტრი" class="search_init" />
    														</th>
    													<th>
    															<input style="width:100px;" type="text" name="search_partner" value="ფილტრი" class="search_init" />
    														</th>
    													<th>
    															<input style="width:100px;" type="text" name="search_partner" value="ფილტრი" class="search_init" />
    														</th>
    													</tr>
    												</thead>
    							                </table>
    							            </div>
    							            <div class="spacer">
    							            </div>
    							        </div>
								    </fieldset>';
    // }
    $data .= '
 					</table>
					</fieldset>
				</div>
		    </div>';
    $data .= '<input type="hidden" id="outgoing_call_id" value="' . $res['id'] . '" />';
    return $data;
}
Exemple #9
0
function GetPage($res, $increment)
{
    if ($res[id] == '') {
        $incr_id = increment(project);
    } else {
        $incr_id = $res[id];
    }
    $data .= '
	
	<div id="dialog-form">
	    <fieldset style="width: 260px; height: 255px; float: left;">
	       <legend>ძირითადი ინფორმაცია</legend>
			<table class="dialog-form-table">
	           <tr>
	               <td colspan="2"><label for="incomming_cat_1_1_1">დასახელება</label></td>
    	       </tr>
	           <tr>
	               <td colspan="2"><input id="project_name" style="resize: vertical;width: 250px;" value="' . $res[name] . '"></td>
    	       </tr>
	       		<tr>
	               <td colspan="2"><label style="margin-top: 30px;" for="incomming_comment">ტიპი</label></td>
	           </tr>
	           <tr>
               		<td>
						<select style="margin-top: 10px; width: 257px;"  id="project_type">' . Get_type($res[type_id]) . '</select>
					</td>
	               
	           </tr>
			   <tr>
                             
        	       <td><label style="margin-top: 30px;" for="client_person_phone2">შექმნის თარიღი</label></td>
               </tr>
    	       <tr>
                   <td><input id="project_add_date" type="text" value="' . $res[create_date] . '"></td>
               </tr>
	       </table>
		 </fieldset>
	    
	    
        <div id="side_menu1" style="float: left;height: 273px; width: 80px;margin-left: 10px; background: #272727; color: #FFF;margin-top: 6px;">
	       <spam class="phone" style="display: block;padding: 10px 5px;  cursor: pointer;" onclick="show_right_side1(\'phone\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/info.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ნომერი</div></spam>
           <spam class="holiday" style="display: block;padding: 10px 5px;  cursor: pointer;" onclick="show_right_side1(\'holiday\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/holiday.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">სამუშაო<br>დღე/სთ</div></spam>
	       <spam class="import" style="display: none;padding: 10px 5px;  cursor: pointer;" onclick="show_right_side1(\'import\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/import.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">იმპორტი</div></spam>
	       <spam class="actived" style="display: none;padding: 10px 5px;  cursor: pointer;" onclick="show_right_side1(\'actived\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/actived.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">აქტივაცია</div></spam>
	    </div>
	    
	    <div style="width: 790px; float: left; margin-left: 10px;" id="right_side_project">
            <fieldset style="display:none;" id="phone">
                <legend>ნომერი</legend>
	            <span id="hide_said_menu_number" class="hide_said_menu">x</span>
                <div class="margin_top_10">           
	            <div id="button_area">
                    <button id="add_number">დამატება</button>
					<button id="delete_number">წაშლა</button>
                </div>
				<table class="display" id="table_number" style="width: 100%;">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 30%;">ნომერი</th>
                            <th style="width: 20%;">რიგი</th>
                            <th style="width: 30%;">შიდა ნომ.</th>
                            <th style="width: 20%;">სცენარი</th>
							<th style="width: 25px;" class="check">&nbsp;</th>
						</tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                        	   <input type="text" name="search_id" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                            	<input type="text" name="search_number" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
							<th>
				            	<div class="callapp_checkbox">
				                    <input type="checkbox" id="check-all-number" name="check-all" />
				                    <label style="margin-top: 3px;" for="check-all-number"></label>
				                </div>
				            </th>
						</tr>
                    </thead>
                </table>
	            </div>
		</fieldset>
                       
                       <fieldset style="display:none;" id="holiday">
                <legend>სამუშაო დღე/სთ</legend>
	            <span class="hide_said_menu">x</span>
	    <style>
	    #work_table{
	    
	    width: 100%;
	    margin-top:15px;
	    }
	    #work_table td,#work_table th{
	    border: 1px solid;
        font-size: 11px;
        font-weight: normal;
        text-align: center;
	    }
	    .im_border{
	    border:1px solid;
	    }
        #work_table td input{
        display:none;
        }
	    </style>
               
	            <table class="dialog-form-table" id="work_table">
                    <tr>
                        <th style="width: ;"></th>
                	    <th style="width: ;">00:00</th>
                	    <th style="width: ;">01:00</th>
                	    <th style="width: ;">02:00</th>
                	    <th style="width: ;">03:00</th>
                	    <th style="width: ;">04:00</th>
                	    <th style="width: ;">05:00</th>
                	    <th style="width: ;">06:00</th>
                	    <th style="width: ;">07:00</th>
                	    <th style="width: ;">08:00</th>
                	    <th style="width: ;">09:00</th>
                	    <th style="width: ;">10:00</th>
                	    <th style="width: ;">11:00</th>
                	    <th style="width: ;">12:00</th>
                	    <th style="width: ;">13:00</th>
                	    <th style="width: ;">14:00</th>
	                    <th style="width: ;">15:00</th>
                	    <th style="width: ;">16:00</th>
                	    <th style="width: ;">17:00</th>
                	    <th style="width: ;">18:00</th>
                	    <th style="width: ;">19:00</th>
	                    <th style="width: ;">20:00</th>
                	    <th style="width: ;">21:00</th>
                	    <th style="width: ;">22:00</th>
                	    <th style="width: ;">23:00</th>
                    </tr>
    	            <tr id="wday1">
                        <td onclick="OpenWeek(1)">ორშ</td>
                	    <td style="" clock="0"  check_clock="" wday="1" ></td>
                	    <td style="" clock="1"  check_clock="" wday="1" ></td>
                	    <td style="" clock="2"  check_clock="" wday="1" ></td>
                	    <td style="" clock="3"  check_clock="" wday="1" ></td>
                	    <td style="" clock="4"  check_clock="" wday="1" ></td>
                	    <td style="" clock="5"  check_clock="" wday="1" ></td>
                	    <td style="" clock="6"  check_clock="" wday="1" ></td>
                	    <td style="" clock="7"  check_clock="" wday="1" ></td>
                	    <td style="" clock="8"  check_clock="" wday="1" ></td>
                	    <td style="" clock="9"  check_clock="" wday="1" ></td>
                	    <td style="" clock="10"  check_clock="" wday="1" ></td>
                	    <td style="" clock="11"  check_clock="" wday="1" ></td>
                	    <td style="" clock="12"  check_clock="" wday="1" ></td>
                	    <td style="" clock="13"  check_clock="" wday="1" ></td>
                	    <td style="" clock="14"  check_clock="" wday="1" ></td>
	                    <td style="" clock="15"  check_clock="" wday="1" ></td>
                	    <td style="" clock="16"  check_clock="" wday="1" ></td>
                	    <td style="" clock="17"  check_clock="" wday="1" ></td>
                	    <td style="" clock="18"  check_clock="" wday="1" ></td>
                	    <td style="" clock="19"  check_clock="" wday="1" ></td>
	                    <td style="" clock="20"  check_clock="" wday="1" ></td>
                	    <td style="" clock="21"  check_clock="" wday="1" ></td>
                	    <td style="" clock="22"  check_clock="" wday="1" ></td>
                	    <td style="" clock="23"  check_clock="" wday="1" ></td>
                    </tr>
	                <tr id="wday2">
                        <td onclick="OpenWeek(2)">სამ</td>
                	    <td style="" clock="0"  check_clock="" wday="2" ></td>
                	    <td style="" clock="1"  check_clock="" wday="2" ></td>
                	    <td style="" clock="2"  check_clock="" wday="2" ></td>
                	    <td style="" clock="3"  check_clock="" wday="2" ></td>
                	    <td style="" clock="4"  check_clock="" wday="2" ></td>
                	    <td style="" clock="5"  check_clock="" wday="2" ></td>
                	    <td style="" clock="6"  check_clock="" wday="2" ></td>
                	    <td style="" clock="7"  check_clock="" wday="2" ></td>
                	    <td style="" clock="8"  check_clock="" wday="2" ></td>
                	    <td style="" clock="9"  check_clock="" wday="2" ></td>
                	    <td style="" clock="10"  check_clock="" wday="2" ></td>
                	    <td style="" clock="11"  check_clock="" wday="2" ></td>
                	    <td style="" clock="12"  check_clock="" wday="2" ></td>
                	    <td style="" clock="13"  check_clock="" wday="2" ></td>
                	    <td style="" clock="14"  check_clock="" wday="2" ></td>
	                    <td style="" clock="15"  check_clock="" wday="2" ></td>
                	    <td style="" clock="16"  check_clock="" wday="2" ></td>
                	    <td style="" clock="17"  check_clock="" wday="2" ></td>
                	    <td style="" clock="18"  check_clock="" wday="2" ></td>
                	    <td style="" clock="19"  check_clock="" wday="2" ></td>
	                    <td style="" clock="20"  check_clock="" wday="2" ></td>
                	    <td style="" clock="21"  check_clock="" wday="2" ></td>
                	    <td style="" clock="22"  check_clock="" wday="2" ></td>
                	    <td style="" clock="23"  check_clock="" wday="2" ></td>
                    </tr>
	                <tr id="wday3">
                        <td onclick="OpenWeek(3)">ოთხ</td>
                	    <td style="" clock="0"  check_clock="" wday="3" ></td>
                	    <td style="" clock="1"  check_clock="" wday="3" ></td>
                	    <td style="" clock="2"  check_clock="" wday="3" ></td>
                	    <td style="" clock="3"  check_clock="" wday="3" ></td>
                	    <td style="" clock="4"  check_clock="" wday="3" ></td>
                	    <td style="" clock="5"  check_clock="" wday="3" ></td>
                	    <td style="" clock="6"  check_clock="" wday="3" ></td>
                	    <td style="" clock="7"  check_clock="" wday="3" ></td>
                	    <td style="" clock="8"  check_clock="" wday="3" ></td>
                	    <td style="" clock="9"  check_clock="" wday="3" ></td>
                	    <td style="" clock="10"  check_clock="" wday="3" ></td>
                	    <td style="" clock="11"  check_clock="" wday="3" ></td>
                	    <td style="" clock="12"  check_clock="" wday="3" ></td>
                	    <td style="" clock="13"  check_clock="" wday="3" ></td>
                	    <td style="" clock="14"  check_clock="" wday="3" ></td>
	                    <td style="" clock="15"  check_clock="" wday="3" ></td>
                	    <td style="" clock="16"  check_clock="" wday="3" ></td>
                	    <td style="" clock="17"  check_clock="" wday="3" ></td>
                	    <td style="" clock="18"  check_clock="" wday="3" ></td>
                	    <td style="" clock="19"  check_clock="" wday="3" ></td>
	                    <td style="" clock="20"  check_clock="" wday="3" ></td>
                	    <td style="" clock="21"  check_clock="" wday="3" ></td>
                	    <td style="" clock="22"  check_clock="" wday="3" ></td>
                	    <td style="" clock="23"  check_clock="" wday="3" ></td>
                    </tr>
	                <tr id="wday4">
                        <td onclick="OpenWeek(4)">ხუთ</td>
                	    <td style="" clock="0"  check_clock="" wday="4" ></td>
                	    <td style="" clock="1"  check_clock="" wday="4" ></td>
                	    <td style="" clock="2"  check_clock="" wday="4" ></td>
                	    <td style="" clock="3"  check_clock="" wday="4" ></td>
                	    <td style="" clock="4"  check_clock="" wday="4" ></td>
                	    <td style="" clock="5"  check_clock="" wday="4" ></td>
                	    <td style="" clock="6"  check_clock="" wday="4" ></td>
                	    <td style="" clock="7"  check_clock="" wday="4" ></td>
                	    <td style="" clock="8"  check_clock="" wday="4" ></td>
                	    <td style="" clock="9"  check_clock="" wday="4" ></td>
                	    <td style="" clock="10"  check_clock="" wday="4" ></td>
                	    <td style="" clock="11"  check_clock="" wday="4" ></td>
                	    <td style="" clock="12"  check_clock="" wday="4" ></td>
                	    <td style="" clock="13"  check_clock="" wday="4" ></td>
                	    <td style="" clock="14"  check_clock="" wday="4" ></td>
	                    <td style="" clock="15"  check_clock="" wday="4" ></td>
                	    <td style="" clock="16"  check_clock="" wday="4" ></td>
                	    <td style="" clock="17"  check_clock="" wday="4" ></td>
                	    <td style="" clock="18"  check_clock="" wday="4" ></td>
                	    <td style="" clock="19"  check_clock="" wday="4" ></td>
	                    <td style="" clock="20"  check_clock="" wday="4" ></td>
                	    <td style="" clock="21"  check_clock="" wday="4" ></td>
                	    <td style="" clock="22"  check_clock="" wday="4" ></td>
                	    <td style="" clock="23"  check_clock="" wday="4" ></td>
                    </tr>
	                <tr id="wday5">
                        <td onclick="OpenWeek(5)">პარ</td>
                	    <td style="" clock="0"  check_clock="" wday="5" ></td>
                	    <td style="" clock="1"  check_clock="" wday="5" ></td>
                	    <td style="" clock="2"  check_clock="" wday="5" ></td>
                	    <td style="" clock="3"  check_clock="" wday="5" ></td>
                	    <td style="" clock="4"  check_clock="" wday="5" ></td>
                	    <td style="" clock="5"  check_clock="" wday="5" ></td>
                	    <td style="" clock="6"  check_clock="" wday="5" ></td>
                	    <td style="" clock="7"  check_clock="" wday="5" ></td>
                	    <td style="" clock="8"  check_clock="" wday="5" ></td>
                	    <td style="" clock="9"  check_clock="" wday="5" ></td>
                	    <td style="" clock="10"  check_clock="" wday="5" ></td>
                	    <td style="" clock="11"  check_clock="" wday="5" ></td>
                	    <td style="" clock="12"  check_clock="" wday="5" ></td>
                	    <td style="" clock="13"  check_clock="" wday="5" ></td>
                	    <td style="" clock="14"  check_clock="" wday="5" ></td>
	                    <td style="" clock="15"  check_clock="" wday="5" ></td>
                	    <td style="" clock="16"  check_clock="" wday="5" ></td>
                	    <td style="" clock="17"  check_clock="" wday="5" ></td>
                	    <td style="" clock="18"  check_clock="" wday="5" ></td>
                	    <td style="" clock="19"  check_clock="" wday="5" ></td>
	                    <td style="" clock="20"  check_clock="" wday="5" ></td>
                	    <td style="" clock="21"  check_clock="" wday="5" ></td>
                	    <td style="" clock="22"  check_clock="" wday="5" ></td>
                	    <td style="" clock="23"  check_clock="" wday="5" ></td>
                    </tr>
	                <tr id="wday6">
                        <td onclick="OpenWeek(6)">შაბ</td>
                	    <td style="" clock="0"  check_clock="" wday="6" ></td>
                	    <td style="" clock="1"  check_clock="" wday="6" ></td>
                	    <td style="" clock="2"  check_clock="" wday="6" ></td>
                	    <td style="" clock="3"  check_clock="" wday="6" ></td>
                	    <td style="" clock="4"  check_clock="" wday="6" ></td>
                	    <td style="" clock="5"  check_clock="" wday="6" ></td>
                	    <td style="" clock="6"  check_clock="" wday="6" ></td>
                	    <td style="" clock="7"  check_clock="" wday="6" ></td>
                	    <td style="" clock="8"  check_clock="" wday="6" ></td>
                	    <td style="" clock="9"  check_clock="" wday="6" ></td>
                	    <td style="" clock="10"  check_clock="" wday="6" ></td>
                	    <td style="" clock="11"  check_clock="" wday="6" ></td>
                	    <td style="" clock="12"  check_clock="" wday="6" ></td>
                	    <td style="" clock="13"  check_clock="" wday="6" ></td>
                	    <td style="" clock="14"  check_clock="" wday="6" ></td>
	                    <td style="" clock="15"  check_clock="" wday="6" ></td>
                	    <td style="" clock="16"  check_clock="" wday="6" ></td>
                	    <td style="" clock="17"  check_clock="" wday="6" ></td>
                	    <td style="" clock="18"  check_clock="" wday="6" ></td>
                	    <td style="" clock="19"  check_clock="" wday="6" ></td>
	                    <td style="" clock="20"  check_clock="" wday="6" ></td>
                	    <td style="" clock="21"  check_clock="" wday="6" ></td>
                	    <td style="" clock="22"  check_clock="" wday="6" ></td>
                	    <td style="" clock="23"  check_clock="" wday="6" ></td>
                    </tr>
	                <tr id="wday7">
                        <td onclick="OpenWeek(7)">კვი</td>
                	    <td style="" clock="0"  check_clock="" wday="7" ></td>
                	    <td style="" clock="1"  check_clock="" wday="7" ></td>
                	    <td style="" clock="2"  check_clock="" wday="7" ></td>
                	    <td style="" clock="3"  check_clock="" wday="7" ></td>
                	    <td style="" clock="4"  check_clock="" wday="7" ></td>
                	    <td style="" clock="5"  check_clock="" wday="7" ></td>
                	    <td style="" clock="6"  check_clock="" wday="7" ></td>
                	    <td style="" clock="7"  check_clock="" wday="7" ></td>
                	    <td style="" clock="8"  check_clock="" wday="7" ></td>
                	    <td style="" clock="9"  check_clock="" wday="7" ></td>
                	    <td style="" clock="10"  check_clock="" wday="7" ></td>
                	    <td style="" clock="11"  check_clock="" wday="7" ></td>
                	    <td style="" clock="12"  check_clock="" wday="7" ></td>
                	    <td style="" clock="13"  check_clock="" wday="7" ></td>
                	    <td style="" clock="14"  check_clock="" wday="7" ></td>
	                    <td style="" clock="15"  check_clock="" wday="7" ></td>
                	    <td style="" clock="16"  check_clock="" wday="7" ></td>
                	    <td style="" clock="17"  check_clock="" wday="7" ></td>
                	    <td style="" clock="18"  check_clock="" wday="7" ></td>
                	    <td style="" clock="19"  check_clock="" wday="7" ></td>
	                    <td style="" clock="20"  check_clock="" wday="7" ></td>
                	    <td style="" clock="21"  check_clock="" wday="7" ></td>
                	    <td style="" clock="22"  check_clock="" wday="7" ></td>
                	    <td style="" clock="23"  check_clock="" wday="7" ></td>
                    </tr>
	            </table>
	            <table class="dialog-form-table">
                    <tr>
                       <td style="width: 210px;"><label for="queue_scenar">საანგარიშო პერიოდი</label></td>    
	                   <td></td>
                    </tr>
    	            <tr>
                       <td><input style="width: 150px; float: left;" id="start_date_holi" type="text"><span style="margin-top: 5px;float: left;">-დან</span></td>
	                   <td><input style="width: 150px; float: left;" id="end_date_holi" type="text"><span style="margin-top: 5px;float: left;">-მდე</span></td>
                    </tr>
	            </table>
	            <table class="dialog-form-table">
                    <tr>
	                   <td><input id="holiday_all" type="checkbox"></td>
                       <td style="width: ;"><label for="holiday_id">დღესასწაულები</label></td>
                	   <td style="width: ;"><select id="holiday_id" style="width:253px;">' . GetHoliday() . '</select></td>
	                   <td style="width: ;"><button id="add_holiday">დამატება</button></td>
                	   <td style="width: ;"><button id="delete_holiday">წაშლა</button></td>
                    </tr>
	            </table>
                <table class="display" id="table_holiday" >
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 29%;">თარიღი</th>
                            <th style="width: 40%;;">სახელი</th>
                            <th style="width: 29%;">კატეგორია</th>
							<th style="width: 30px;" class="check">&nbsp;</th>
						</tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                        	   <input type="text" name="search_id" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                            	<input type="text" name="search_number" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
							<th>
				            	<div class="callapp_checkbox">
				                    <input type="checkbox" id="check-all-holiday" name="check-all" />
				                    <label style="margin-top: 3px;" for="check-all-holiday"></label>
				                </div>
				            </th>
						</tr>
                    </thead>
                </table>
            </fieldset>
                       
        <fieldset style="display:none;" id="import">
                <legend>იმპორტი</legend>
	            <span id="hide_said_menu_number" class="hide_said_menu">x</span>
                <div class="margin_top_10">           
	            <div id="button_area">
                       
                    <button id="download_exel">შაბლონის ჩამოტვირთვა</button>
                    <button id="open_choseFile">ბაზის ატვირთვა</button>
					<button id="add_import">დამატება</button>
                    <button id="delete_import">წაშლა</button>
                </div>
				<table class="display" id="table_import" >
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 70px;">სახელი</th>
                            <th style="width: 70px;">გვარი</th>
                            <th style="width: 70px;">პირადი ნომერი</th>
                            <th style="width: 95px;">ტელეფონი 1</th>
                            <th style="width: 95px;">ტელეფონი 2</th>
							<th style="width: 11px;" class="check">&nbsp;</th>
						</tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                        	   <input type="text" name="search_id" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                            	<input type="text" name="search_number" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
							<th>
				            	<div class="callapp_checkbox">
				                    <input type="checkbox" id="check-all-import" name="check-all" />
				                    <label style="margin-top: 3px;" for="check-all-import"></label>
				                </div>
				            </th>
						</tr>
                    </thead>
                </table>
	            </div>
		</fieldset>
                       
        <fieldset style="display:none;" id="actived">
                <legend>აქტივაცია</legend>
	            <span id="hide_said_menu_number" class="hide_said_menu">x</span>
                <div class="margin_top_10">           
	            <div id="button_area">
                    <button id="add_import_actived">აქტივაცია</button>
                    <button id="delete_import_actived">წაშლა</button>
                </div>
                </div>
				<table class="display" id="table_import_actived" >
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 70px;">სახელი</th>
                            <th style="width: 70px;">გვარი</th>
                            <th style="width: 70px;">პირადი ნომერი</th>
                            <th style="width: 95px;">ტელეფონი 1</th>
                            <th style="width: 95px;">ტელეფონი 2</th>
							<th style="width: 11px;" class="check">&nbsp;</th>
						</tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                        	   <input type="text" name="search_id" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                            	<input type="text" name="search_number" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
							<th>
				            	<div class="callapp_checkbox">
				                    <input type="checkbox" id="check-all-import-actived" name="check-all" />
				                    <label style="margin-top: 3px;" for="check-all-import-actived"></label>
				                </div>
				            </th>
						</tr>
                    </thead>
                </table>
	            </div>
		</fieldset>
    	</div>
	</div>
	</div>
	<input type="hidden" value="' . $res[id] . '" id="project_hidden_id">
	<input type="hidden" value="' . $incr_id . '" id="hidden_project_id">';
    return $data;
}
Exemple #10
0
<?php

function increment($range, $limit)
{
    $i = 0;
    while ($i <= $limit) {
        print "<p>{$i}</p>";
        $i = $i + $range;
    }
}
if (isset($_POST['x']) && isset($_POST['y'])) {
    $x = $_POST['x'];
    $y = $_POST['y'];
    increment($x, $y);
}
?>

<form method="post">
	Increment by: <input type="text" name="x" /><br/>
	Until we get to: <input type="text" name="y" /><br/>
	<input type="submit" name="submit" value="Go!" />
</form>
Exemple #11
0
require_once '../../includes/classes/core.php';
// Main Strings
$action = $_REQUEST['act'];
$error = '';
$data = '';
// Incomming Call Dialog Strings
$hidden_id = $_REQUEST['id'];
$person_name = mysql_real_escape_string($_REQUEST['person_name']);
$person_surname = mysql_real_escape_string($_REQUEST['person_surname']);
$person_posityon = mysql_real_escape_string($_REQUEST['person_posityon']);
$person_mobile = mysql_real_escape_string($_REQUEST['person_mobile']);
$person_phone = mysql_real_escape_string($_REQUEST['person_phone']);
$person_comment = mysql_real_escape_string($_REQUEST['person_comment']);
switch ($action) {
    case 'get_add_page':
        $page = GetPage('', increment(incomming_call));
        $data = array('page' => $page);
        break;
    case 'get_edit_page':
        $page = GetPage(Getincomming($hidden_id));
        $data = array('page' => $page);
        break;
    case 'disable':
        $hidden_id = $_REQUEST['id'];
        mysql_query("\tUPDATE  `client_person` \r\n\t\t\t\t\t\tSET \t\r\n\t\t\t\t\t\t\t`actived` = 0 \r\n\t\t\t\t\tWHERE `id`='{$hidden_id}'\r\n\t\t\t\t");
        break;
    case 'save-client_person':
        $hidden_id = $_REQUEST['hidden_id'];
        $hidden_client_id = $_REQUEST['hidden_client_id'];
        if ($hidden_id == '') {
            Addperson($hidden_client_id, $person_name, $person_surname, $person_posityon, $person_mobile, $person_phone, $person_comment);
Exemple #12
0
<?php

/**
 * 测试例子
 * @link http://code.google.com/p/phplock/
 * @author sunli
 * @blog http://sunli.cnblogs.com
 * @svnversion  $Id$
 * @version v1.0 beta1
 * @license Apache License Version 2.0
 * @copyright  sunli1223@gmail.com
 */
echo increment();
function increment()
{
    if (!file_exists('testunlockfile')) {
        file_put_contents('testunlockfile', 0);
    }
    $num = file_get_contents('testunlockfile');
    $num = $num + 1;
    file_put_contents('testunlockfile', $num);
    return file_get_contents('testunlockfile');
}
function ss_get_mysql_stats($options)
{
    # Process connection options and connect to MySQL.
    global $debug, $mysql_user, $mysql_pass, $heartbeat, $cache_dir, $poll_time, $chk_options;
    # Connect to MySQL.
    $user = isset($options['user']) ? $options['user'] : $mysql_user;
    $pass = isset($options['pass']) ? $options['pass'] : $mysql_pass;
    $heartbeat = isset($options['heartbeat']) ? $options['heartbeat'] : $heartbeat;
    $conn = @mysql_connect($options['host'], $user, $pass);
    if (!$conn) {
        die("Can't connect to MySQL: " . mysql_error());
    }
    $sanitized_host = str_replace(array(":", "/"), array("", "_"), $options['host']);
    $cache_file = "{$cache_dir}/{$sanitized_host}-mysql_cacti_stats.txt";
    # First, check the cache.
    $fp = null;
    if (!isset($options['nocache'])) {
        # This will block if someone else is accessing the file.
        $result = run_query("SELECT GET_LOCK('cacti_monitoring', {$poll_time}) AS ok", $conn);
        $row = @mysql_fetch_assoc($result);
        if ($row['ok']) {
            # Nobody else had the file locked.
            if (file_exists($cache_file) && filesize($cache_file) > 0 && filectime($cache_file) + $poll_time / 2 > time()) {
                # The file is fresh enough to use.
                $arr = file($cache_file);
                # The file ought to have some contents in it!  But just in case it
                # doesn't... (see issue #6).
                if (count($arr)) {
                    run_query("SELECT RELEASE_LOCK('cacti_monitoring')", $conn);
                    return $arr[0];
                } else {
                    if ($debug) {
                        trigger_error("The function file({$cache_file}) returned nothing!\n");
                    }
                }
            }
        }
        if (!($fp = fopen($cache_file, 'w+'))) {
            die("Cannot open file '{$cache_file}'");
        }
    }
    # Set up variables.
    $status = array('transactions' => null, 'relay_log_space' => null, 'binary_log_space' => null, 'current_transactions' => null, 'locked_transactions' => null, 'active_transactions' => null, 'innodb_locked_tables' => null, 'innodb_lock_structs' => null, 'State_closing_tables' => null, 'State_copying_to_tmp_table' => null, 'State_end' => null, 'State_freeing_items' => null, 'State_init' => null, 'State_locked' => null, 'State_login' => null, 'State_preparing' => null, 'State_reading_from_net' => null, 'State_sending_data' => null, 'State_sorting_result' => null, 'State_statistics' => null, 'State_updating' => null, 'State_writing_to_net' => null, 'State_none' => null, 'State_other' => null);
    # Get SHOW STATUS and convert the name-value array into a simple
    # associative array.
    $result = run_query("SHOW /*!50002 GLOBAL */ STATUS", $conn);
    while ($row = @mysql_fetch_row($result)) {
        $status[$row[0]] = $row[1];
    }
    # Get SHOW VARIABLES and convert the name-value array into a simple
    # associative array.
    $result = run_query("SHOW VARIABLES", $conn);
    while ($row = @mysql_fetch_row($result)) {
        $status[$row[0]] = $row[1];
    }
    # Get SHOW SLAVE STATUS.
    if ($chk_options['slave']) {
        $result = run_query("SHOW SLAVE STATUS", $conn);
        while ($row = @mysql_fetch_assoc($result)) {
            # Must lowercase keys because different versions have different
            # lettercase.
            $row = array_change_key_case($row, CASE_LOWER);
            $status['relay_log_space'] = $row['relay_log_space'];
            $status['slave_lag'] = $row['seconds_behind_master'];
            # Check replication heartbeat, if present.
            if ($heartbeat) {
                $result = run_query("SELECT GREATEST(0, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(ts) - 1)" . "FROM {$heartbeat} WHERE id = 1", $conn);
                $row2 = @mysql_fetch_row($result);
                $status['slave_lag'] = $row2[0];
            }
            # Scale slave_running and slave_stopped relative to the slave lag.
            $status['slave_running'] = $row['slave_sql_running'] == 'Yes' ? $status['slave_lag'] : 0;
            $status['slave_stopped'] = $row['slave_sql_running'] == 'Yes' ? 0 : $status['slave_lag'];
        }
    }
    # Get info on master logs. TODO: is there a way to do this without querying
    # mysql again?
    $binlogs = array(0);
    if ($chk_options['master'] && $status['log_bin'] == 'ON') {
        # See issue #8
        $result = run_query("SHOW MASTER LOGS", $conn);
        while ($row = @mysql_fetch_assoc($result)) {
            $row = array_change_key_case($row, CASE_LOWER);
            # Older versions of MySQL may not have the File_size column in the
            # results of the command.  Zero-size files indicate the user is
            # deleting binlogs manually from disk (bad user! bad!) but we should
            # not croak with a thread-stack error just because of the bad user.
            if (array_key_exists('file_size', $row) && $row['file_size'] > 0) {
                $binlogs[] = $row['file_size'];
            } else {
                break;
            }
        }
    }
    # Get SHOW PROCESSLIST and aggregate it.
    if ($chk_options['procs']) {
        $result = run_query('SHOW PROCESSLIST', $conn);
        while ($row = @mysql_fetch_assoc($result)) {
            $state = $row['State'];
            if (is_null($state)) {
                $state = 'NULL';
            }
            if ($state == '') {
                $state = 'none';
            }
            $state = str_replace(' ', '_', strtolower($state));
            if (array_key_exists("State_{$state}", $status)) {
                increment($status, "State_{$state}", 1);
            } else {
                increment($status, "State_other", 1);
            }
        }
    }
    # Get SHOW INNODB STATUS and extract the desired metrics from it. See issue
    # #8.
    $innodb_txn = false;
    $innodb_complete = false;
    if ($chk_options['innodb'] && $status['have_innodb'] == 'YES') {
        $result = run_query("SHOW /*!50000 ENGINE*/ INNODB STATUS", $conn);
        $innodb_array = @mysql_fetch_assoc($result);
        $flushed_to = false;
        $innodb_lsn = false;
        $innodb_prg = false;
        $is_plugin = false;
        $spin_waits = array();
        $spin_rounds = array();
        $os_waits = array();
        foreach (explode("\n", $innodb_array['Status']) as $line) {
            $row = explode(' ', $line);
            # SEMAPHORES
            if (strpos($line, 'Mutex spin waits') !== FALSE) {
                $spin_waits[] = tonum($row[3]);
                $spin_rounds[] = tonum($row[5]);
                $os_waits[] = tonum($row[8]);
            } elseif (strpos($line, 'RW-shared spins') !== FALSE) {
                $spin_waits[] = tonum($row[2]);
                $spin_waits[] = tonum($row[8]);
                $os_waits[] = tonum($row[5]);
                $os_waits[] = tonum($row[11]);
            } elseif (strpos($line, 'Trx id counter') !== FALSE) {
                # The beginning of the TRANSACTIONS section: start counting
                # transactions
                $innodb_txn = isset($row[4]) ? array($row[3], $row[4]) : tonum($row[3]);
            } elseif (strpos($line, 'Purge done for trx') !== FALSE) {
                # PHP can't do big math, so I send it to MySQL.
                $innodb_prg = $row[7] == 'undo' ? tonum($row[6]) : array($row[6], $row[7]);
            } elseif (strpos($line, 'History list length') !== FALSE) {
                $status['history_list'] = tonum($row[3]);
            } elseif ($innodb_txn && strpos($line, '---TRANSACTION') !== FALSE) {
                increment($status, 'current_transactions', 1);
                if (strpos($line, 'ACTIVE') !== FALSE) {
                    increment($status, 'active_transactions', 1);
                }
            } elseif ($innodb_txn && strpos($line, 'LOCK WAIT') !== FALSE) {
                increment($status, 'locked_transactions', 1);
            } elseif (strpos($line, 'read views open inside') !== FALSE) {
                $status['read_views'] = tonum($row[0]);
            } elseif (strpos($line, 'mysql tables in use') !== FALSE) {
                increment($status, 'innodb_locked_tables', tonum($row[6]));
            } elseif (strpos($line, 'lock struct(s) !== FALSE ')) {
                increment($status, 'innodb_lock_structs', tonum($row[0]));
            } elseif (strpos($line, 'OS file reads') !== FALSE) {
                $status['file_reads'] = tonum($row[0]);
                $status['file_writes'] = tonum($row[4]);
                $status['file_fsyncs'] = tonum($row[8]);
            } elseif (strpos($line, 'Pending normal aio') !== FALSE) {
                $status['pending_normal_aio_reads'] = tonum($row[4]);
                $status['pending_normal_aio_writes'] = tonum($row[7]);
            } elseif (strpos($line, 'ibuf aio reads') !== FALSE) {
                $status['pending_ibuf_aio_reads'] = tonum($row[4]);
                $status['pending_aio_log_ios'] = tonum($row[7]);
                $status['pending_aio_sync_ios'] = tonum($row[10]);
            } elseif (strpos($line, 'Pending flushes (fsync) !== FALSE ')) {
                $status['pending_log_flushes'] = tonum($row[4]);
                $status['pending_buf_pool_flushes'] = tonum($row[7]);
            } elseif (strpos($line, 'merged recs') !== FALSE) {
                $status['ibuf_inserts'] = tonum($row[0]);
                $status['ibuf_merged'] = tonum($row[2]);
                $status['ibuf_merges'] = tonum($row[5]);
            } elseif (strpos($line, "log i/o's done") !== FALSE) {
                $status['log_writes'] = tonum($row[0]);
            } elseif (strpos($line, "pending log writes") !== FALSE) {
                $status['pending_log_writes'] = tonum($row[0]);
                $status['pending_chkp_writes'] = tonum($row[4]);
            } elseif (strpos($line, "Log sequence number") !== FALSE) {
                # 5.1 plugin displays differently (issue 52)
                $innodb_lsn = isset($row[4]) ? array($row[3], $row[4]) : tonum($row[3]);
            } elseif (strpos($line, "Log flushed up to") !== FALSE) {
                # Since PHP can't handle 64-bit numbers, we'll ask MySQL to do it for
                # us instead.  And we get it to cast them to strings, too.
                $flushed_to = isset($row[7]) ? array($row[6], $row[7]) : tonum($row[6]);
            } elseif (strpos($line, "Buffer pool size ") !== FALSE) {
                # 5.1 plugin displays differently (issue 52)
                $status['pool_size'] = isset($row[10]) ? tonum($row[10]) : tonum($row[5]);
            } elseif (strpos($line, "Buffer pool size, bytes") !== FALSE) {
                $is_plugin = true;
            } elseif (strpos($line, "Free buffers") !== FALSE) {
                $status['free_pages'] = tonum($row[8]);
            } elseif (strpos($line, "Database pages") !== FALSE) {
                $status['database_pages'] = tonum($row[6]);
            } elseif (strpos($line, "Modified db pages") !== FALSE) {
                $status['modified_pages'] = tonum($row[4]);
            } elseif (strpos($line, "Pages read") !== FALSE) {
                $status['pages_read'] = tonum($row[2]);
                $status['pages_created'] = tonum($row[4]);
                $status['pages_written'] = tonum($row[6]);
            } elseif (strpos($line, 'Number of rows inserted') !== FALSE) {
                $status['rows_inserted'] = tonum($row[4]);
                $status['rows_updated'] = tonum($row[6]);
                $status['rows_deleted'] = tonum($row[8]);
                $status['rows_read'] = tonum($row[10]);
            } elseif (strpos($line, "queries inside InnoDB") !== FALSE) {
                $status['queries_inside'] = tonum($row[0]);
                $status['queries_queued'] = tonum($row[4]);
            }
        }
        $innodb_complete = strpos($innodb_array['Status'], 'END OF INNODB MONITOR OUTPUT');
    }
    if (!$innodb_complete) {
        # TODO: Fill in some values with stuff from SHOW STATUS.
    }
    # Derive some values from other values.
    # PHP sucks at bigint math, so we use MySQL to calculate things that are
    # too big for it.
    if ($innodb_txn) {
        if (!$is_plugin) {
            $txn = make_bigint_sql($innodb_txn[0], $innodb_txn[1]);
            $lsn = make_bigint_sql($innodb_lsn[0], $innodb_lsn[1]);
            $flu = make_bigint_sql($flushed_to[0], $flushed_to[1]);
            $prg = make_bigint_sql($innodb_prg[0], $innodb_prg[1]);
        } else {
            $txn = make_decimal_sql($innodb_txn);
            $lsn = make_decimal_sql($innodb_lsn);
            $flu = make_decimal_sql($flushed_to);
            $prg = make_decimal_sql($innodb_prg);
        }
        $sql = "SELECT CONCAT('', {$txn}) AS innodb_transactions, " . "CONCAT('', ({$txn} - {$prg})) AS unpurged_txns, " . "CONCAT('', {$lsn}) AS log_bytes_written, " . "CONCAT('', {$flu}) AS log_bytes_flushed, " . "CONCAT('', ({$lsn} - {$flu})) AS unflushed_log, " . "CONCAT('', " . implode('+', $spin_waits) . ") AS spin_waits, " . "CONCAT('', " . implode('+', $spin_rounds) . ") AS spin_rounds, " . "CONCAT('', " . implode('+', $os_waits) . ") AS os_waits";
        # echo("$sql\n");
        $result = run_query($sql, $conn);
        while ($row = @mysql_fetch_assoc($result)) {
            foreach ($row as $key => $val) {
                $status[$key] = $val;
            }
        }
        # TODO: I'm not sure what the deal is here; need to debug this.  But the
        # unflushed log bytes spikes a lot sometimes and it's impossible for it to
        # be more than the log buffer.
        $status['unflushed_log'] = max($status['unflushed_log'], $status['innodb_log_buffer_size']);
    }
    if (count($binlogs)) {
        $status['binary_log_space'] = sprintf('%u', array_sum($binlogs));
    }
    # Define the variables to output.  I use shortened variable names so maybe
    # it'll all fit in 1024 bytes for Cactid and Spine's benefit.  This list must
    # come right after the word MAGIC_VARS_DEFINITIONS.  The Perl script parses
    # it and uses it as a Perl variable.
    # this is the list of --items !
    $keys = array('Key_read_requests' => 'a0', 'Key_reads' => 'a1', 'Key_write_requests' => 'a2', 'Key_writes' => 'a3', 'history_list' => 'a4', 'innodb_transactions' => 'a5', 'read_views' => 'a6', 'current_transactions' => 'a7', 'locked_transactions' => 'a8', 'active_transactions' => 'a9', 'pool_size' => 'aa', 'free_pages' => 'ab', 'database_pages' => 'ac', 'modified_pages' => 'ad', 'pages_read' => 'ae', 'pages_created' => 'af', 'pages_written' => 'ag', 'file_fsyncs' => 'ah', 'file_reads' => 'ai', 'file_writes' => 'aj', 'log_writes' => 'ak', 'pending_aio_log_ios' => 'al', 'pending_aio_sync_ios' => 'am', 'pending_buf_pool_flushes' => 'an', 'pending_chkp_writes' => 'ao', 'pending_ibuf_aio_reads' => 'ap', 'pending_log_flushes' => 'aq', 'pending_log_writes' => 'ar', 'pending_normal_aio_reads' => 'as', 'pending_normal_aio_writes' => 'at', 'ibuf_inserts' => 'au', 'ibuf_merged' => 'av', 'ibuf_merges' => 'aw', 'spin_waits' => 'ax', 'spin_rounds' => 'ay', 'os_waits' => 'az', 'rows_inserted' => 'b0', 'rows_updated' => 'b1', 'rows_deleted' => 'b2', 'rows_read' => 'b3', 'Table_locks_waited' => 'b4', 'Table_locks_immediate' => 'b5', 'Slow_queries' => 'b6', 'Open_files' => 'b7', 'Open_tables' => 'b8', 'Opened_tables' => 'b9', 'innodb_open_files' => 'ba', 'open_files_limit' => 'bb', 'table_cache' => 'bc', 'Aborted_clients' => 'bd', 'Aborted_connects' => 'be', 'Max_used_connections' => 'bf', 'Slow_launch_threads' => 'bg', 'Threads_cached' => 'bh', 'Threads_connected' => 'bi', 'Threads_created' => 'bj', 'Threads_running' => 'bk', 'max_connections' => 'bl', 'thread_cache_size' => 'bm', 'Connections' => 'bn', 'slave_running' => 'bo', 'slave_stopped' => 'bp', 'Slave_retried_transactions' => 'bq', 'slave_lag' => 'br', 'Slave_open_temp_tables' => 'bs', 'Qcache_free_blocks' => 'bt', 'Qcache_free_memory' => 'bu', 'Qcache_hits' => 'bv', 'Qcache_inserts' => 'bw', 'Qcache_lowmem_prunes' => 'bx', 'Qcache_not_cached' => 'by', 'Qcache_queries_in_cache' => 'bz', 'Qcache_total_blocks' => 'c0', 'query_cache_size' => 'c1', 'Questions' => 'c2', 'Com_update' => 'c3', 'Com_insert' => 'c4', 'Com_select' => 'c5', 'Com_delete' => 'c6', 'Com_replace' => 'c7', 'Com_load' => 'c8', 'Com_update_multi' => 'c9', 'Com_insert_select' => 'ca', 'Com_delete_multi' => 'cb', 'Com_replace_select' => 'cc', 'Select_full_join' => 'cd', 'Select_full_range_join' => 'ce', 'Select_range' => 'cf', 'Select_range_check' => 'cg', 'Select_scan' => 'ch', 'Sort_merge_passes' => 'ci', 'Sort_range' => 'cj', 'Sort_rows' => 'ck', 'Sort_scan' => 'cl', 'Created_tmp_tables' => 'cm', 'Created_tmp_disk_tables' => 'cn', 'Created_tmp_files' => 'co', 'Bytes_sent' => 'cp', 'Bytes_received' => 'cq', 'innodb_log_buffer_size' => 'cr', 'unflushed_log' => 'cs', 'log_bytes_flushed' => 'ct', 'log_bytes_written' => 'cu', 'relay_log_space' => 'cv', 'binlog_cache_size' => 'cw', 'Binlog_cache_disk_use' => 'cx', 'Binlog_cache_use' => 'cy', 'binary_log_space' => 'cz', 'innodb_locked_tables' => 'd0', 'innodb_lock_structs' => 'd1', 'State_closing_tables' => 'd2', 'State_copying_to_tmp_table' => 'd3', 'State_end' => 'd4', 'State_freeing_items' => 'd5', 'State_init' => 'd6', 'State_locked' => 'd7', 'State_login' => 'd8', 'State_preparing' => 'd9', 'State_reading_from_net' => 'da', 'State_sending_data' => 'db', 'State_sorting_result' => 'dc', 'State_statistics' => 'dd', 'State_updating' => 'de', 'State_writing_to_net' => 'df', 'State_none' => 'dg', 'State_other' => 'dh', 'Handler_commit' => 'di', 'Handler_delete' => 'dj', 'Handler_discover' => 'dk', 'Handler_prepare' => 'dl', 'Handler_read_first' => 'dm', 'Handler_read_key' => 'dn', 'Handler_read_next' => 'do', 'Handler_read_prev' => 'dp', 'Handler_read_rnd' => 'dq', 'Handler_read_rnd_next' => 'dr', 'Handler_rollback' => 'ds', 'Handler_savepoint' => 'dt', 'Handler_savepoint_rollback' => 'du', 'Handler_update' => 'dv', 'Handler_write' => 'dw');
    # Return the output.
    $output = array();
    foreach ($keys as $key => $short) {
        # If the value isn't defined, return -1 which is lower than (most graphs')
        # minimum value of 0, so it'll be regarded as a missing value.
        $val = isset($status[$key]) ? $status[$key] : -1;
        $output[] = "{$short}:{$val}";
    }
    $result = implode(' ', $output);
    if ($fp) {
        if (fwrite($fp, $result) === FALSE) {
            die("Cannot write to '{$cache_file}'");
        }
        fclose($fp);
        run_query("SELECT RELEASE_LOCK('cacti_monitoring')", $conn);
    }
    return $result;
}
    }
    $statement->closeCursor();
    //second we check for mask concordance
    $items = validate_from_network($conf, $items, $checker);
    $items = validate_from_regex($conf, $items, $checker);
    //third and last we randomly choose an item
    if (count($items) > 0) {
        $max = count($items);
        $index = rand(0, $max);
        while (!isset($items[$index])) {
            $index = rand(0, $max);
        }
        return $items[$index];
    } else {
        error_log("Unable to define a valid item for the checker :" . $checker . ". You should review your configuration.", 0);
        return null;
    }
}
$pdo = connexionbdd($conf);
$var = random_select($pdo, $checker, $conf);
if ($var != null) {
    $host_explode = explode(':', $var['item']);
    if (count($host_explode) == 3) {
        $array = array("host" => $host_explode[0], "protocole" => $host_explode[1], "port" => $host_explode[2], "string" => "");
    } else {
        $array = array("host" => $host_explode[0], "protocole" => $host_explode[1], "port" => $host_explode[2], "string" => $host_explode[3]);
    }
    $json = json_encode($array);
    increment($var['item'], $pdo);
    echo $json;
}
Exemple #15
0
function save_in_num($hidden_id, $in_num_name, $in_num_num, $user, $global_id, $id_in_up)
{
    if ($hidden_id == '') {
        if ($global_id == '') {
            $insert_id = increment('queue');
        } else {
            $insert_id = $global_id;
        }
        mysql_query("INSERT INTO `queue_detail`\n                    (`queue_id`, `user_id`, `ext_name`, `ext_number`)\n                    VALUES\n                    ('{$insert_id}', '{$user}', '{$in_num_name}', '{$in_num_num}');");
    } else {
        if ($id_in_up == '') {
            mysql_query("INSERT INTO `queue_detail`\n                     (`user_id`, `queue_id`, `ext_name`, `ext_number`)\n                     VALUES\n                     ('{$user}', '{$hidden_id}', '{$in_num_name}', '{$in_num_num}');");
        } else {
            mysql_query("UPDATE `queue_detail` SET\n                                `user_id`='{$user}',\n                                `ext_name`='{$in_num_name}',\n                                `ext_number`='{$in_num_num}'\n                         WHERE  `id`='{$id_in_up}';");
        }
    }
    return $insert_id;
}
             $row[] = $aRow[$i];
             if ($i == $count - 1) {
                 $row[] = '<input type="checkbox" name="check_' . $aRow[$hidden] . '" class="check" value="' . $aRow[$hidden] . '" />';
             }
         }
         $data['aaData'][] = $row;
     }
     break;
 case 'save_department_detail1':
     $department_detail1_id = $_REQUEST['id'];
     $sub_dep_id = $_REQUEST['sub_dep_id'];
     $department_id = $_REQUEST['department_id'];
     $hidde_sub_department_id = $_REQUEST['hidde_sub_department_id'];
     if ($sub_dep_id > 0) {
         if ($department_id == '') {
             $department_id = increment('department');
         }
         $ceck_department_detail = mysql_query("SELECT department_detail1.sub_department_id\r\n                                                   FROM   department_detail1\r\n                                                   WHERE  department_detail1.sub_department_id='{$sub_dep_id}' \r\n                                    \t\t       AND    department_detail1.department_id='{$department_id}' \r\n                                    \t\t       AND    department_detail1.actived=1\r\n    \t\t                                       LIMIT 1");
         if (mysql_num_rows($ceck_department_detail) >= 1) {
             $check_update = mysql_fetch_assoc($ceck_department_detail);
             if ($hidde_sub_department_id == $check_update[sub_department_id]) {
                 Savedepartment_detail1($department_detail1_id, $sub_dep_id);
             } else {
                 global $error;
                 $error = 'ასეთი დეპარტამენტი არის სიაში';
             }
         } else {
             if ($department_detail1_id == '') {
                 Adddepartment_detail1($department_detail1_id, $department_id, $sub_dep_id);
             } else {
                 Savedepartment_detail1($department_detail1_id, $sub_dep_id);
Exemple #17
0
function GetPage($res = '', $number)
{
    $num = 0;
    if ($res[phone] == "") {
        $num = $number;
    } else {
        $num = $res[phone];
    }
    $increm = mysql_query("\tSELECT  `name`,\r\n\t\t\t`rand_name`\r\n\t\t\tFROM \t`file`\r\n\t\t\tWHERE   `task_id` = {$res['id']}\r\n\t\t\t");
    if ($res[call_id] == '') {
        $data .= '<div id="dialog-form">
							<div style="float: left; width: 500px;">
								<fieldset >
							    	<legend>ძირითადი ინფორმაცია</legend>
						
							    	<table width="100%" class="dialog-form-table">
										<tr>
											<td style="width: 180px;"><label for="req_num">დავალების №</label></td>
											<td style="width: 180px !important;"><label for="req_data">ფორმირების თარიღი</label></td>
											<td style="width: 180px;"><label for="req_phone">ტელეფონი</label></td>
										</tr>
										<tr>
											<td style="width: 180px;">
												<input type="text" id="id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField user_id\'" value="' . $res['id'] . '" disabled="disabled" />
											</td>
											<td style="width: 180px;">
												<input type="text" id="c_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField date\'" value="' . $res['call_date'] . '" disabled="disabled" />
											</td>
											<td style="width: 180px;">
												<input type="text" id="phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['phone'] . '" disabled="disabled" />
											</td>
											<td style="width: 69px;">
												<button class="calls">ნომრები</button>
											</td>
										</tr>
														
										<tr>
											<td style="width: 180px;"><label for="req_num">შესრულების გეგმ. დრო</label></td>
											<td style="width: 180px !important;"><label for="req_data">შესრულების ფაქტ. დრო</label></td>
											<td style="width: 180px;"><label for="req_phone">შესრულების დრო</label></td>
										</tr>
										<tr>
											<td style="width: 180px;">
												<input type="text" id="planned_end_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['planned_end_date'] . '" disabled="disabled" />
											</td>
											<td style="width: 180px;">
												<input type="text" id="fact_end_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['fact_end_date'] . '" disabled="disabled" />
											</td>
											<td style="width: 180px;">
												<input type="text" id="call_duration" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['call_duration'] . '" disabled="disabled" />
											</td>
											<td style="width: 69px;">
											</td>
										</tr>';
        $data .= '<table class="dialog-form-table">
										<tr>
											<td style="width: 180px;"><label for="d_number">დავალების ტიპი</label></td>
											<td style="width: 180px;"><label for="d_number">განყოფილება</label></td>
											<td style="width: 180px;"><label for="d_number">პასუხისმგებელი პირი</label></td>
											
										</tr>
							    		<tr>
											<td style="width: 180px;"><select id="task_type_id" class="idls object"disabled="disabled" disabled="disabled">' . Gettask_type($res['task_type_id']) . '</select></td>
											<td style="width: 180px;"><select id="task_department_id" class="idls object"disabled="disabled">' . Getdepartment($res['task_department_id']) . '</select></td>
											<td style="width: 180px;"><select id="persons_id" class="idls object" disabled="disabled">' . Getpersonss($res['persons_id']) . '</select></td>
											
										</tr>
										<tr>
											<td style="width: 180px;"><label for="d_number">პრიორიტეტები</label></td>
											<td style="width: 180px;"><label for="d_number">თემა</label></td>
											<td style="width: 180px;"></td>
										</tr>
										<tr>
											<td style="width: 180px;"><select id="priority_id" class="idls object" disabled="disabled">' . Getpriority($res['priority_id']) . '</select></td>
											<td style="width: 180px;"><select id="template_id" class="idls object" disabled="disabled">' . Gettemplate($res['template_id']) . '</select></td>
											<td style="width: 180px;"></td>
										</tr>
										<tr>
											<td style="width: 150px;"><label for="content">კომენტარი</label></td>
											<td style="width: 150px;"><label for="content"></label></td>
											<td style="width: 150px;"><label for="content"></label></td>
										</tr>
													
										
										<tr>
						
											<td colspan="6">
												<textarea  style="width: 641px; resize: none;" id="comment" class="idle" name="call_content" cols="300" rows="2" disabled="disabled">' . $res['comment'] . '</textarea>
											</td>
										</tr>
										<tr>
											<td style="width: 180px;"><label for="content">საუბრის შინაარსი</label></td>
										</tr>
										<tr>
								
											<td colspan="6">
												<textarea style="width: 641px; resize: none;" id="problem_comment" class="idle" name="call_content" cols="300" rows="2" >' . $res['problem_comment'] . '</textarea>
											</td>
										</tr>
									</table>
						        </fieldset>
							</div>
							<div>
								  </fieldset>
							</div>
							<div style="float: right;  width: 355px;">
								 <fieldset>
									<legend>მომართვის ავტორი</legend>
									<table style="height: 243px;">
										<tr>
											<td style="width: 180px;">PIN კოდი</td>
											<td style="width: 180px;">ეგობრის PIN ცოდი</td>
										</tr>
										<tr>
											<td style="width: 180px;"><input type="text" id="personal_pin" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_pin'] . '" /></td>
											<td style="width: 180px;"><input type="text" id="personal_pin" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['friend_pin'] . '" /></td>
											
										</tr>
										<tr>
											<td style="width: 180px;">პირადი ნომერი</td>
											<td style="width: 180px;"></td>
										</tr>
										<tr>
											<td style="width: 180px;">
												<input type="text" id="personal_id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_id'] . '" />
											</td>
											<td style="width: 180px;"></td>
										</tr>
										<tr>
											<td style="width: 180px;">სახელი და გვარი</td>
											</td>
										</tr>
										<tr >
											<td style="width: 180px;">' . $res['name1'] . '</td>
											</td>
										</tr>
										<tr >
											<td style="width: 180px;">ტელეფონი</td>
											</td>
										</tr>
										<tr>
											<td style="width: 180px;">' . $res['personal_phone'] . '</td>
											</td>
										</tr>
										<tr>
											<td style="width: 180px;">ელ-ფოსტა</td>
											</td>
										</tr>
										<tr>
											<td style="width: 180px;">' . $res['mail'] . '</td>
											<td ></td>
										</tr>
							
						
										<tr>
											<td td style="width: 180px;">user-ი</td>
											<td td style="width: 180px;"></td>
										</tr>
										<tr>
											<td style="width: 180px;">' . $res['user'] . '</td>
											<td td style="width: 180px;"></td>
										</tr>
									</table>
								</fieldset>
								<fieldset>
									<legend>მომართვის ავტორი</legend>
									<table>
										<tr>
											<td>სულ</td>
											<td></td>
											<td></td>
											<td style="width: 150px;"></td>
											<td>1</td>
										</tr>
										<tr>
											<td></td>
											<td>მოგვარებულები</td>
											<td></td>
											<td style="width: 150px;"></td>
										    <td>2</td>
										</tr>
										<tr>
											<td></td>
											<td></td>
											<td>პრეტენზია</td>
											<td style="width: 150px;"></td>
											<td>2</td>
										</tr>
										<tr>
											<td></td>
											<td></td>
											<td>ინფორმაცია</td>
											<td style="width: 150px;"></td>
											<td>2</td>
										</tr>
										<tr>
											<td></td>
											<td>მიმდინარე</td>
											<td></td>
											<td style="width: 150px;"></td>
											<td>2</td>
										</tr>
										<tr>
											<td></td>
											<td></td>
											<td></td>
											<td style="width: 150px;"></td>
											<td>2</td>
										</tr>
										<tr>
											<td></td>
											<td></td>
											<td>პრეტენზია</td>
											<td style="width: 150px;"></td>
											<td>2</td>
										</tr>
										<tr>
											<td></td>
											<td></td>
											<td>ინფორმაცია</td>
											<td style="width: 150px;"></td>
											<td>2</td>
										</tr>
										<tr>
											<td></td>
											<td></td>
											<td></td>
											<td style="width: 150px;"></td>
								    		<td style="width: 300px;">
											<input type="button" value="ვრცლად"/>
						      				</td>
										</tr>
						
									</tr>
									</table>
								</fieldset>
								<fieldset>
									<legend>დამატებითი ინფორმაცია</legend> 
									<table style="float: left; border: 1px solid #85b1de; width: 180px; text-align: center;">
										<tr style="border-bottom: 1px solid #85b1de;">
											<td colspan="2">საუბრის ჩანაწერი</td>
										</tr>
										<tr style="border-bottom: 1px solid #85b1de; ">
											<td>დრო</td>
											<td style="border-left:1px solid #85b1de; width: 50px;">ჩანაწერი</td>
										</tr>
										<tr >
											<td></td>
											<td><input type="button" value="მოსმენა"/></td>
										</tr>
									<table/>
									<table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
										<tr>
											<td>
												<div class="file-uploader">
													<input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
													<button id="choose_button" class="center">აირჩიეთ ფაილი</button>
													<input id="hidden_inc" type="text" value="' . increment('task') . '" style="display: none;">
												</div>
											</td>
										</tr>
									</table>
								     <table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
								          <tr style="border-bottom: 1px solid #85b1de;">
								           <td colspan="3">მიმაგრებული ფაილი</td>
								          </tr>
									</table>
									<table id="file_div" style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">';
        while ($increm_row = mysql_fetch_assoc($increm)) {
            $data .= ' 
									        <tr style="border-bottom: 1px solid #85b1de;">
									          <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td>													 
									          <td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td>
									          <td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td>
									        </tr>';
        }
        $data .= '
				 					</table>
								</fieldset>
							</div>
				    </div>';
    } else {
        $data .= '<div id="dialog-form">
					<div style="float: left; width: 500px;">	
						<fieldset >
					    	<legend>ძირითადი ინფორმაცია</legend>
				
					    	<table width="100%" class="dialog-form-table">
								<tr>
									<td style="width: 180px;"><label for="req_num">მომართვა №</label></td>
									<td style="width: 180px !important;"><label for="req_data">თარიღი</label></td>
									<td style="width: 180px;"><label for="req_phone">ტელეფონი</label></td>
								</tr>
								<tr>
									<td style="width: 180px;">
										<input type="text" id="id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField user_id\'" value="' . $res['id'] . '" disabled="disabled" />
									</td>
									<td style="width: 180px;">
										<input type="text" id="c_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField date\'" value="' . $res['call_date'] . '" disabled="disabled" />
									</td>
									<td style="width: 180px;">
										<input type="text" id="phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $num . '" />
									</td>
									<td style="width: 69px;">
										<button class="calls">ნომრები</button>
									</td>
								</tr>
								<tr>
									<td style="width: 180px;"><label for="d_number">ზარის ტიპი</label></td>
									<td style="width: 180px;"><label for="d_number">კატეგორია</label></td>
									<td style="width: 180px;"><label for="d_number">ქვე-კატეგოტია</label></td>
									<td ></td>
								</tr>
								<tr>
									<td style="width: 180px;"><select id="call_type_id" class="idls object" disabled="disabled">' . Getcall_type($res['call_type_id']) . '</select></td>
									<td style="width: 180px;"><select id="category_parent_id" class="idls object" disabled="disabled">' . Getcategory($res['category_parent_id']) . '</select></td>
									<td style="width: 180px;"><select id="category_id" class="idls object" disabled="disabled">' . Getcategory1_edit($res['category_id']) . '</select></td>
									<td ></td>
								</tr>
							</table>';
        if (Getcategory($res['category_parent_id']) == 407) {
            $data .= '<table id="additional" class="hidden dialog-form-table" width="100%">
								<tr >
									<td style="width: 180px;"><label for="d_number">შეტანის ფორმა</label></td>
									<td style="width: 180px;"><label for="d_number">მომსახურე ბანკი</label></td>
									<td style="width: 180px;"><label for="d_number">ფილიალი</label></td>
									<td style="width: 106px;"></td>
								</tr>
								<tr >
									<td style="width: 180px;"><select id="pay_type_id" class="idls object" disabled="disabled">' . Getpay_type($res['pay_type_id']) . '</select></td>
									<td style="width: 180px;"><select id="bank_id" class="idls object" disabled="disabled">' . Get_bank($res['bank_id']) . '</select></td>
									<td style="width: 180px;"><select id="bank_object_id" class="idls object" disabled="disabled">' . Getbank_object_edit($res['bank_object_id']) . '</select></td>
									<td style="width: 106px;"></td>
								</tr>
								<tr >
									<td style="width: 180px;"><label for="d_number">ბარათის ტიპი</label></td>
									<td style="width: 180px;"><label for="d_number">ანგარიშსწორება</label></td>
									<td style="width: 180px;"><label for="d_number">აპარატის ტიპი</label></td>
									<td style="width: 106px;"></td>
								</tr>
								<tr >
									<td style="width: 180px;"><select id="card_type_id" class="idls object" disabled="disabled">' . Getcard_type($res['card_type_id']) . '</select></td>
									<td style="width: 180px;"><select id="card_type1_id" class="idls object" disabled="disabled">' . Getcard_type1($res['card_type1_id']) . '</select></td>
									<td style="width: 180px;"><select id="pay_aparat_id" class="idls object" disabled="disabled">' . Getpay_aparat($res['pay_aparat_id']) . '</select></td>
									<td style="width: 106px;"></td>
								</tr>
							</table>';
        }
        $data .= '<table width="100%" class="dialog-form-table">
								<tr>
									<td style="width: 180px;"><label for="req_num">პრობლემის თარიღი</label></td>
									<td style="width: 180px;"><label for="d_number">ობიექტი</label></td>
									<td style="width: 180px;"><label for="d_number">ზარის სტატუსი</label></td>			
									<td ></td>
								</tr>
								<tr>	
									<td style="width: 180px;"> <input type="text" id="problem_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res[problem_date] . '"disabled="disabled" /></td>
									<td style="width: 180px;"><select id="object_id" class="idls object" disabled="disabled">' . Getobject($res['object_id']) . '</select></td>
									<td style="width: 180px;"><select id="call_status_id" class="idls object"disabled="disabled">' . Getcall_status($res['status']) . '</select></td>	
									<td ></td>
								</tr>
								<tr>
									<td style="width: 180px;"><label for="content">საუბრის შინაარსი</label></td>
								</tr>
								<tr>
									
									<td colspan="6">	
										<textarea disabled="disabled" style="width: 641px; resize: none;" id="call_content" class="idle" name="call_content" cols="300" rows="2" >' . $res['call_content'] . '</textarea>
									</td>
								</tr>	
								<tr>
									<td style="width: 180px;"><label for="content">პრობლემის გადაწყვეტა</label></td>
								</tr>
								<tr>
						
									<td colspan="6">
										<textarea  style="width: 641px; resize: none;" id="problem_comment" class="idle" name="call_content" cols="300" rows="2">' . $res['problem_comment'] . '</textarea>
									</td>
								</tr>		
							</table>
						</fieldset >
				   
						<fieldset style="margin-top: 5px;">
					    	<legend>დავალების ფორმირება</legend>
				
					    	<table class="dialog-form-table">
								<tr>
									<td style="width: 180px;"><label for="d_number">დავალების ტიპი</label></td>
									<td style="width: 180px;"><label for="d_number">განყოფილება</label></td>
									<td style="width: 180px;"><label for="d_number">პასუხისმგებელი პირი</label></td>
								</tr>
					    		<tr>
									<td style="width: 180px;"><select id="task_type_id" class="idls object"disabled="disabled">' . Gettask_type($res['task_type_id']) . '</select></td>
									<td style="width: 180px;"><select id="task_department_id" class="idls object"disabled="disabled">' . Getdepartment($res['task_department_id']) . '</select></td>
									<td style="width: 180px;"><select id="persons_id" class="idls object"disabled="disabled">' . Getpersonss($res['persons_id']) . '</select></td>
								</tr>
								<tr>
									<td style="width: 180px;"><label for="d_number">პრიორიტეტები</label></td>
									<td style="width: 180px;"></td>
									<td style="width: 180px;"></td>
								</tr>
								<tr>
									<td style="width: 180px;"><select id="priority_id" class="idls object">' . Getpriority($res['priority_id']) . '</select></td>
									<td style="width: 180px;"></td>
									<td style="width: 180px;"></td>
								</tr>
								<tr>
									<td style="width: 150px;"><label for="content">კომენტარი</label></td>
									<td style="width: 150px;"><label for="content"></label></td>
									<td style="width: 150px;"><label for="content"></label></td>
								</tr>
								<tr>
									<td colspan="6">
										<textarea  style="width: 641px; resize: none;" id="comment" class="idle" name="content" cols="300" rows="2">' . $res['comment'] . '</textarea>
									</td>
								</tr>
							
								</tr>
							</table>
				        </fieldset>
					</div>
					<div>
						  </fieldset>
					</div>
					<div style="float: right;  width: 355px;">
						 <fieldset>
									<legend>მომართვის ავტორი</legend>
									<table style="height: 243px;">
										<tr>
											<td style="width: 180px;">PIN კოდი</td>
											<td style="width: 180px;">ეგობრის PIN ცოდი</td>
										</tr>
										<tr>
											<td style="width: 180px;"><input type="text" id="personal_pin" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_pin'] . '" /></td>
											<td style="width: 180px;"><input type="text" id="personal_pin" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['friend_pin'] . '" /></td>
											
										</tr>
										<tr>
											<td style="width: 180px;">პირადი ნომერი</td>
											<td style="width: 180px;"></td>
										</tr>
										<tr>
											<td style="width: 180px;">
												<input type="text" id="personal_id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_id'] . '" />
											</td>
											<td style="width: 180px;"></td>
										</tr>
										<tr>
											<td style="width: 180px;">სახელი და გვარი</td>
											</td>
										</tr>
										<tr >
											<td style="width: 180px;">' . $res['name1'] . '</td>
											</td>
										</tr>
										<tr >
											<td style="width: 180px;">ტელეფონი</td>
											</td>
										</tr>
										<tr>
											<td style="width: 180px;">' . $res['personal_phone'] . '</td>
											</td>
										</tr>
										<tr>
											<td style="width: 180px;">ელ-ფოსტა</td>
											</td>
										</tr>
										<tr>
											<td style="width: 180px;">' . $res['mail'] . '</td>
											<td ></td>
										</tr>
							
						
										<tr>
											<td td style="width: 180px;">user-ი</td>
											<td td style="width: 180px;"></td>
										</tr>
										<tr>
											<td style="width: 180px;">' . $res['user'] . '</td>
											<td td style="width: 180px;"></td>
										</tr>
									</table>
								</fieldset>
						<fieldset>
							<legend>მომართვის ავტორი</legend>
							<table>
								<tr>
									<td>სულ</td>
									<td></td>
									<td></td>
									<td style="width: 150px;"></td>
									<td>1</td>
								</tr>
								<tr>
									<td></td>
									<td>მოგვარებულები</td>
									<td></td>
									<td style="width: 150px;"></td>
								    <td>2</td>
								</tr>
								<tr>
									<td></td>
									<td></td>
									<td>პრეტენზია</td>
									<td style="width: 150px;"></td>
									<td>2</td>
								</tr>
								<tr>
									<td></td>
									<td></td>
									<td>ინფორმაცია</td>
									<td style="width: 150px;"></td>
									<td>2</td>
								</tr>
								<tr>
									<td></td>
									<td>მიმდინარე</td>
									<td></td>
									<td style="width: 150px;"></td>
									<td>2</td>
								</tr>
								<tr>
									<td></td>
									<td></td>
									<td></td>
									<td style="width: 150px;"></td>
									<td>2</td>
								</tr>
								<tr>
									<td></td>
									<td></td>
									<td>პრეტენზია</td>
									<td style="width: 150px;"></td>
									<td>2</td>
								</tr>
								<tr>
									<td></td>
									<td></td>
									<td>ინფორმაცია</td>
									<td style="width: 150px;"></td>
									<td>2</td>
								</tr>
								<tr>
									<td></td>
									<td></td>
									<td></td>
									<td style="width: 150px;"></td>
						    		<td style="width: 300px;">
									<input type="button" value="ვრცლად"/>
				      				</td>
								</tr>
												
							</tr>
							</table>
						</fieldset>
						<fieldset>
									<legend>დამატებითი ინფორმაცია</legend> 
									<table style="float: left; border: 1px solid #85b1de; width: 180px; text-align: center;">
										<tr style="border-bottom: 1px solid #85b1de;">
											<td colspan="2">საუბრის ჩანაწერი</td>
										</tr>
										<tr style="border-bottom: 1px solid #85b1de; ">
											<td>დრო</td>
											<td style="border-left:1px solid #85b1de; width: 50px;">ჩანაწერი</td>
										</tr>
										<tr >
											<td></td>
											<td><input type="button" value="მოსმენა"/></td>
										</tr>
									<table/>
									<table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
										<tr>
											<td>
												<div class="file-uploader">
													<input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
													<button id="choose_button" class="center">აირჩიეთ ფაილი</button>
													<input id="hidden_inc" type="text" value="' . increment('task') . '" style="display: none;">
												</div>
											</td>
										</tr>
									</table>
								     <table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
								          <tr style="border-bottom: 1px solid #85b1de;">
								           <td colspan="3">მიმაგრებული ფაილი</td>
								          </tr>
									</table>
									<table id="file_div" style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">';
        while ($increm_row = mysql_fetch_assoc($increm)) {
            $data .= ' 
										        <tr style="border-bottom: 1px solid #85b1de;">
										          <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td>													 
										          <td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td>
										          <td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td>
										        </tr>';
        }
        $data .= '
				 					</table>
								</fieldset>
					</div>
		    </div>';
    }
    $data .= '<input type="hidden" id="outgoing_call_id" value="' . $res['id'] . '" />';
    return $data;
}
Exemple #18
0
<?php

require_once __DIR__ . '/common.php';
$passwords = [];
while (count($passwords) < 2) {
    $input = increment($input, $stringLength - 1);
    if (valid($input)) {
        $passwords[] = $input;
    }
}
echo 'Answer: ' . $passwords[1];
Exemple #19
0
<?php

function increment($val)
{
    return ++$val;
}
$val = 1;
echo increment($val) . PHP_EOL;
echo "Function 2:" . PHP_EOL;
function increment2($val)
{
    return $val++;
}
$val = 1;
echo increment2($val) . PHP_EOL;
Exemple #20
0
function GetPage($res = '', $number, $incom_id)
{
    $num = 0;
    if ($res[phone] == "") {
        $num = $number;
    } else {
        $num = $res[phone];
    }
    $tanxa = 'class="hidden dialog-form-table"';
    $disabled = '';
    $hidden_class = '';
    if ($_REQUEST['id'] == '') {
        $hidden_class = 'class="hidden"';
    } else {
        //echo $_REQUEST['id'];
        if ($res[category_id] == 407) {
            //echo $res[category_id];
            $tanxa = 'class="dialog-form-table"';
        } else {
            $tanxa = 'class="hidden dialog-form-table"';
        }
        $disabled = 'disabled="disabled"';
    }
    $increm = mysql_query("\tSELECT  `name`,\n\t \t\t\t\t\t\t\t\t`rand_name`,\n\t\t\t\t\t\t\t\t\t`id`\n\t\t\t\t\t\t\tFROM \t`file`\n\t\t\t\t\t\t\tWHERE   `task_id` = {$res['id']}\n\t\t\t\t\t\t\t  ");
    $data .= '
	<!-- jQuery Dialog -->
    <div id="add-edit-goods-form" title="საქონელი">
    	<!-- aJax -->
	</div>
	<div id="dialog-form">
			<div style="float: left; width: 500px;">	
				<fieldset >
			    	<legend>ძირითადი ინფორმაცია</legend>
		
			    	<table width="100%" class="dialog-form-table">
						<tr>
							<td style="width: 215px;"><label for="req_num">დავალების №</label></td>
							<td style="width: 215px !important;"><label for="req_data">თარიღი</label></td>
							<td style="width: 215px;"><label for="req_data">ტელეფონი</label></td>
						</tr>						
						<tr>
							<td style="width: 215px;">
								<input  style="width: 180px; type="text" id="id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField user_id\'" value="' . $res['id'] . '" disabled="disabled" />
							</td>
							<td style="width: 215px;">
								<input style="width: 180px; type="text" id="c_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField date\'" value="' . $res['call_date'] . '" disabled="disabled" />
							</td>
							<td style="width: 215px;">
								<input style="width: 180px; type="text" id="phone" class="idle" onblur="this.className=\'idle\'" value="' . $res['phone'] . '" />
							</td>
							
						</tr>
					</table>';
    $data .= '<table id="additiona" class="dialog-form-table" width="100%">				
									
						<tr>
							<td style="width: 215px;"><label for="d_number">ზარის ტიპი</label></td>
							<td style="width: 215px;"><label for="d_number">კატეგორია</label></td>
							<td style="width: 215px;"><label for="d_number">ქვე-კატეგოტია</label></td>
							
						</tr>
						<tr>
							<td style="width: 215px;"><select style="width: 186px;" id="call_type_id" class="idls object"" >' . Getcall_type($res['call_type_id']) . '</select></td>
							<td style="width: 215px;"><select style="width: 186px;" id="category_parent_id" class="idls object"" >' . Getcategory1($res['call_type_id'], $res['category_id']) . '</select></td>
							<td style="width: 215px;"><select style="width: 186px;" id="category_id" class="idls object"" >' . Getcategory2($res['category_id'], $res['category_parent_id']) . '</select></td>
							
						</tr>
						</table>
						<table id="additiona3" ' . $tanxa . ' width="100%">
						<tr id="aaaa">
							<td style="width: 215px;"><label id="pey_label1" for="d_number">ტრანზაქციის ფორმა</label></td>
							<td style="width: 215px;"><label for="d_number" id="bank_label">მომსახურე ბანკი</label></td>
							<td style="width: 215px;"><label id="pey_label"  for="d_number" >აპარატის ტიპი</label></td>
							
						</tr>
						<tr id="c">
							<td style="width: 215px;"><select style="width: 186px;" id="pay_type_id" class="idls object">' . Getpay_type($res['pay_type_id']) . '</select></td>
							<td style="width: 215px;"><select style="width: 186px;" id="bank_id" class="idls object">' . Get_bank($res['bank_id']) . '</select></td>
							<td style="width: 215px;"><select style="width: 186px;" id="pay_aparat_id" class="idls object">' . Getpay_aparat($res['pay_aparat_id']) . '</select></td>

						</tr>
						<tr id="bbbb">
							<td style="width: 215px;"><label for="d_number" id="card_label">ბარათის ტიპი</label></td>
							<td style="width: 215px;"></td>
							<td style="width: 215px;"></td>
							
						</tr>
						<tr id="d">
							<td style="width: 215px;"><select style="width: 186px;" id="card_type_id" class="idls object">' . Getcard_type($res['card_type_id']) . '</select></td>
							<td style="width: 215px;"></td>
							<td style="width: 215px;"></td>
						
						</tr>
					</table>
					<table id="additiona2" class="dialog-form-table" width="100%">	
						<tr>
							<td style="width: 215px;"><label for="req_num">პრობლემის თარიღი</label></td>
							<td style="width: 215px;"><label for="d_number">სტატუსი</label></td>
							<td style="width: 215px;"><label for="d_number">ობიექტი</label></td>			
						</tr>
						<tr>	
							<td style="width: 215px;">
								<input style="width: 180px;" type="text" id="problem_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res[problem_date] . '""  />
							</td>
							<td style="width: 215px;"><select style="width: 186px;" id="call_status_id" class="idls object">' . Getcall_status($res['call_status_id']) . '</select></td>
							<td style="width: 215px;"><select style="width: 186px;" id="object_id" class="idls object">' . Getobject($res['object_id']) . '</select></td>	
								
						</tr>
						<tr>
							<td style="width: 215px;"><label for="task_type_id">დავალების ტიპი</label></td>
							<td style="width: 215px;"><label for="task_department_id">განყოფილება</label></td>
							<td style="width: 215px;"><label for="persons_id">პასუხისმგებელი პირი</label></td>
						</tr>
						<tr>
							<td style="width: 215px;"><select style="width: 186px;" id="task_type_id" class="idls object">' . Gettask_type($res['task_type_id']) . '</select></td>
							<td style="width: 215px;"><select style="width: 186px;" id="task_department_id" class="idls object">' . Getdepartment($res['task_department_id']) . '</select></td>
							<td style="width: 215px;"><select style="width: 186px;" id="persons_id" class="idls object">' . Getpersons($res['persons_id']) . '</select></td>
						</tr>
						<tr>
							<td style="width: 215px;"><label for="task_type_id">ინფორმაციის წყარო</label></td>
							<td style="width: 215px;"><label id="pr" class="hidden" for="d_number">პრიორიტეტები</label></td>
							<td style="width: 215px;"></td>
						</tr>
						<tr>
							<td style="width: 215px;"><select style="width: 186px;" id="source" class="idls object">' . Getsource($res['source']) . '</select></td>
							<td style="width: 215px;"><label class="hidden" id="priority"><select id="priority_id" class="idls" >' . Getpriority($res['priority_id']) . '</label></select></td>
							<td style="width: 215px;"></td>
						</tr>
						</table>

									
						<table id="additiona1" class="hidden dialog-form-table" width="100%">
						<tr>
							<td style="width: 215px;"><label for="req_num">შესრ.პერ.დასაწყისი</label></td>
							<td style="width: 215px !important;"><label for="req_data">შესრ.პერ.დასასრული</label></td>
							<td style="width: 215px;"><label for="req_phone">შესრულების დრო</label></td>
						</tr>
						<tr>
							<td style="width: 215px;">
								<input type="text" id="planned_date" style="width: 180px;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['planned_end_date'] . '" />
							</td>
							<td style="width: 215px;">
								<input type="text" id="fact_end_date" style="width: 180px;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['call_date'] . '"/>
							</td>
							<td style="width: 215px;">
								<input type="text" id="call_duration" style="width: 180px;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $num . '" />
							</td>
						</tr>
					</table>	
								<br>	
									
						<table>			
						<tr>
							<td style="width: 150px;"><label for="content">საუბრის შინაარსი</label></td>
							<td style="width: 150px;"><label for="content"></label></td>
							<td style="width: 150px;"><label for="content"></label></td>
						</tr>
						<tr>
							<td colspan="6">
								<textarea  ' . $disabled . ' style="width: 641px; resize: vertical;" id="comment" class="idle" name="content" cols="300" rows="4">' . $res['comment'] . '</textarea>
							</td>
						</tr>
						<tr>
							<td ' . $hidden_class . ' style="width: 215px;"><label for="content">პრობლემის გადაწყვეტა</label></td>
						</tr>
						<tr>
							
							<td colspan="5">	
								<textarea ' . $hidden_class . ' style="width: 641px; resize: vertical;" id="problem_comment" class="idle" name="call_content" cols="300" rows="4">' . $res['problem_comment'] . '</textarea>
							</td>
						</tr>	
					</table>';
    $data .= '
				</fieldset >
		   
				
			</div>
			<div>
				  </fieldset>
			</div>
			<div style="float: right;  width: 355px;">
				 					    
<!---------------------------------------------------------------კლიენტი---------------------------------------------------------------------------->							    
				 <fieldset onload="legal()">
					<legend>მომართვის ავტორი</legend>
					<table style="height: 172px;">
						<tr style="height:20px;">
							<td style="padding: 0px 0px 10px 45px;"><input type="radio" style="float:left;" class="legal" onclick="legal()" value="fhisical" name="legal" ' . ($res['abonent_status'] == "fhisical" ? "checked" : "checked") . '><span style="display: inline-block; margin: 8px;" >ფიზიკური </span></td>
							<td style="width: 180px; height:20px;"><input type="radio" style="float:left;" class="legal" onclick="legal()" value="Jural" name="legal" ' . ($res['abonent_status'] == "Jural" ? "checked" : "") . '><span style="display: inline-block; margin: 8px;">იურიდიული </td>
						</tr>
						<tr style="height:20px;">
							<td style="width: 180px; height:20px;">ტელეფონი</td>
							<td style="width: 180px; height:20px;"><div class="fhisical">პირადი ნომერი</div><div class="Jural">საიდენთიპიკაციო კოდი</div></td>
						</tr>	    
						<tr style="height:40px;">
							<td style="width: 180px; height:20px;"><input type="text" id="abonent_phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_phone'] . '" /></td>
                            <td style="width: 180px; height:20px;"><input type="text" id="abonent_pin" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_pin'] . '" /></td>
						</tr>
						<tr style="height:20px;">
							<td colspan="2" style="height:20px;"><div class="fhisical">აბონენტის სახელი გვარი</div><div class="Jural">ორგანიზაცია</div></td>
						</tr>
						<tr style="height:40px;">
							<td colspan="2" style="height:20px;">
								<input type="text" id="abonent_name" style="width: 328px;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_name'] . '" />
							</td>		
						</tr>
						<tr style="height:20px;" class="Jural">
							<td colspan="2" style="height:20px;">პასუხისმგებელი პირი</td>
						</tr>		    
						<tr style="height:40px;" class="Jural">
							<td colspan="2" style="height:20px;">
								<input type="text" id="abonent_responsibl_person" style="width: 328px;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_responsibl_person'] . '" />
							</td>		
						</tr>		    
						<tr style="height:20px;">
							<td colspan="2" style="height:20px;">მისამართი</td>
						</tr>
						<tr style="height:20px;">
							<td colspan="2" style="height:40px;">
								<textarea type="text" id="abonent_address" style="width: 328px; resize: vertical;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'"  >' . $res['abonent_address'] . '</textarea>
							</td>		
						</tr>
						<tr style="height:20px;">
							<td style="width: 180px;"></td>
							<td style="width: 180px;">აბონენტის ნომერი</td>
						</tr>	    
						<tr style="height:40px;">
							<td style="width: 180px;">შენიშვნა</td>
                            <td style="width: 180px;"><input type="text" id="abonent_number" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['abonent_number'] . '" /></td>
						</tr>
                        <tr style="height:40px;">
							<td colspan="2">
								<textarea type="text" id="abonent_coment" style="width: 328px; resize: vertical;" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" >' . $res['abonent_coment'] . '</textarea>
							</td>		
						</tr>        		    		    
						
					</table>
				</fieldset>
				
				<div id="additional_info">';
    if (!empty($res['personal_pin'])) {
        $data .= get_addition_all_info($res['personal_pin']);
    }
    $data .= '</div>';
    $data .= GetRecordingsSection($res);
    $data .= '		<fieldset>
		         	<legend>დამატებითი ინფორმაცია</legend> 
		         	<table id="additiona1" class="hidden dialog-form-table" style="float: left; border: 1px solid #85b1de; width: 180px; text-align: center;">
			        <table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
						<tr>
							<td>
								<div class="file-uploader">
									<input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
									<button id="choose_button" class="download">აირჩიეთ ფაილი</button>
									<input id="hidden_inc" type="text" value="' . increment('task') . '" style="display: none;">
								</div>
							</td>
						</tr>
					</table>
				     <table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
				          <tr style="border-bottom: 1px solid #85b1de;">
				           <td colspan="3">მიმაგრებული ფაილი</td>
				          </tr>
					</table>
					<table id="file_div" style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">';
    while ($increm_row = mysql_fetch_assoc($increm)) {
        $data .= ' 
									        <tr style="border-bottom: 1px solid #85b1de;">
									          <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td>													 
									          <td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td>
									          <td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td>
									        </tr>';
    }
    $data .= '
		 		</table>
		        </fieldset>
							
			</div>
		<!-- ID -->
		<input type="hidden" id="req_id" value="' . $res['id'] . '" />
    </div>';
    return $data;
}
function GetPage($res = '', $number)
{
    $c_date = date('Y-m-d H:i:s');
    $num = 0;
    if ($res[phone] == "") {
        $num = $number;
    } else {
        $num = $res[phone];
    }
    $data .= '
	<!-- jQuery Dialog -->
    <div id="add-edit-goods-form" title="საქონელი">
    	<!-- aJax -->
	</div>
	<div id="dialog-form">
			<div style="float: left; width: 800px;">	
				<fieldset >
				<fieldset style="width:300px; float:left;">
			    	<legend>ძირითადი ინფორმაცია</legend>
		
			    	<table width="500px" class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="">მომართვა №</label></td>
							<td style="width: 180px;"><label for="">თარიღი</label></td>
						</tr>							
						
						<tr>
							<td style="width: 180px;">
								<input type="text" id="id" class="idle" onblur="this.className=\'idle\'"  value="' . ($res['id'] != '' ? $res['id'] : increment('incomming_call')) . '" disabled="disabled" />
								<input style="display:none;" type="text" id="h_id" class="idle" onblur="this.className=\'idle\'"  value="' . $res['id'] . '" disabled="disabled" />
								<input style="display:none;" type="text" id="miss_date" class="idle" onblur="this.className=\'idle\'"  value="' . $_REQUEST['id'] . '" disabled="disabled" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="c_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField date\'" value="' . ($res['call_date'] != '' ? $res['call_date'] : $c_date) . '" disabled="disabled" />
							</td>				
						</tr>
						<tr>
							<td style="width: 180px;"><label for="phone">ტელეფონი</label></td>							
							<td><label for="person_name">აბონენტის სახელი</label></td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="phone" class="idle" onblur="this.className=\'idle\'"  value="' . $_REQUEST['num'] . '" disabled="disabled" />
							</td>
							<td style="width: 69px;">
								<input type="text" id="person_name" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['first_name'] . '" />
							</td>	
						</tr>
						<tr>
							<td>
								<label for="source_id">არხი</label>
							</td>
							<td>
							</td>
						</tr>
						<tr>
							<td>
								<select style="width: 165px;" id="source_id" class="idls object">' . Getsource($res['source_id']) . '</select>
							</td>
							<td style="width: 69px;">
								<button id="button_calls" class="calls">ნომრები</button>
							</td>
						</tr>				
					</table>
				</fieldset>
				<fieldset style="width:220px; float:left; margin-left:10px; ">
			    	<legend>მომართვის ავტორი</legend>
					<table id="" class="dialog-form-table" width="220px">						
						<tr>
							<td style="width: 220px;"><input style="float:left;" type="radio" name="x" value="1" ' . ($res['type_id'] == '1' ? "checked" : "") . '><span style="margin-top:5px; display:block;">ფიზიკური</span></td>
					  		<td style="width: 220px;"><input style="float:left;" type="radio" name="x" value="2" ' . ($res['type_id'] == '2' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">იურიდიული</span></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:220px; float:left; margin-left:10px; ">
			    	<legend>ზარის ტიპი</legend>
					<table id="" class="dialog-form-table" width="220px">						
						<tr>
							<td style="width: 220px;"><input style="float:left;" type="radio" name="xx" value="1" ' . ($res['call_type_id'] == '1' ? "checked" : "") . '><span style="margin-top:5px; display:block;">ინფორმაცია</span></td>
					  		<td style="width: 220px;"><input style="float:left;" type="radio" name="xx" value="2" ' . ($res['call_type_id'] == '2' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">პრეტენზია</span></td>
					  	</tr>
					  	<tr>
					  		<td style="width: 220px;"><input style="float:left;" type="radio" name="xx" value="3" ' . ($res['call_type_id'] == '3' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">სხვა</span></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:220px; float:left; margin-left:10px; ">
			    	<legend>განყოფილება</legend>
					<table id="" class="dialog-form-table" width="220px">						
						<tr>
							<td><select style="width: 220px;" id="department_id" class="idls object">' . Getdepartment($res['department_id']) . '</select></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:756px; float:left;">
			    	<legend>ინფორმაცია</legend>
					<table id="" class="dialog-form-table" width="500px">
					  	<tr>
					  		<td><label for="information_category_id">კატეგორია</label></td>
					  	</tr>						
						<tr>
							<td><select style="width: 756px;" id="information_category_id" class="idls object">' . Getinformation_category($res['information_category_id']) . '</select></td>
						</tr>
						<tr>
					  		<td><label for="information_category_id">ქვე-კატეგორია</label></td>
					  	</tr>
						<tr>
							<td><select style="width: 756px;" id="information_sub_category_id" class="idls object">' . Getinformation_sub_category($res['information_sub_category_id'], $res['information_category_id']) . '</select></td>
						</tr>
					</table>
				</fieldset>
				
				
				<fieldset style="width:557px; float:left;">
			    	<legend>პროდუქცია</legend>
					<table id="" class="dialog-form-table" width="755px">						
						<tr>
							<td style="width: 50px;"><input style="float:left;" type="radio" name="xxx" value="1" ' . ($res['product_type_id'] == '1' ? "checked" : "") . '><span style="margin-top:5px; display:block;">ახალის შეძენა</span></td>
					  		<td style="width: 50px;"><input style="float:left;" type="radio" name="xxx" value="2" ' . ($res['product_type_id'] == '2' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">შეძენილი</span></td>
					  		<td style="width: 50px;"><input style="float:left;" type="radio" name="xxx" value="3" ' . ($res['product_type_id'] == '3' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">საინტერესო</span></td>
						</tr>
					</table>
				<div id="show_all" class="dialog_hidden">
					<table id="" class="dialog-form-table" width="750px">
					  	<tr>
					  		<td><label for="information_category_id">პროდუქტი კატეგორია</label></td>
					  		<td><label for="information_category_id">ჟანრი</label></td>
					  		<td><label for="information_category_id">დასახელება</label></td>
					  	</tr>						
						<tr>
							<td><select style="width: ;" id="production_category_id" class="idls object">' . Getproduction_category($res['production_category_id'], $res['information_category_id']) . '</select></td>
							<td><select style="width: ;" id="genre_id" class="idls object">' . Getgenre($res['genre_id']) . '</select></td>
							<td><select style="width: ;" id="production_id" class="idls object">' . Getproduction($res['production_id']) . '</select></td>
						</tr>	
											
					</table>
					<table id="" class="dialog-form-table" width="700px">
					  	<tr>
					  		<td><label for="information_category_id">ან შეიყვანეთ კოდი</label></td>
					  		<td></td>
					  		<td><label for="information_category_id">წიგნების ID</label></td>
					  	</tr>						
						<tr>
							<td><select style="width: ;" id="" class="idls object"></select></td>
							<td><button id="add_product">დამატება</button></td>
					  		<td><textarea  style="width: 370px; resize: none;" id="content" class="idle" name="content" cols="300" >' . $res['content'] . '</textarea></td>
						</tr>
					</table>													
					</table>
					  	<table class="dialog-form-table" width="400px">				
					  	<tr>
							<td>ჯამური ღირებულება</td>
							<td><input type="text" style="width: 60px;" id="sum_pirce" class="idle" onblur="this.className=\'idle\'"  value="' . $res['sum_pirce'] . '"  /></td>
							<td>ლარი</td>
							<td><input style="float:left;" type="checkbox" name="xxxx" value="1" ' . ($res['card_id'] == '1' ? "checked" : "") . '><span style="margin-top:8px; display:block;""> + ბარათი</span></td>
						</tr>					
					</table>
					<table class="dialog-form-table" width="750px">
						<tr>
					  		<td><label for="">მიწოდება</label></td>
					  		<td><label style="margin-left:5px;" for="">მოდული</label></td>
					  	</tr>					
					  	<tr>
							<td><select style="width: 330px;" id="shipping_id" class="idls object">' . Getshipping($res['shipping_id']) . '</select></td>
							<td><select style="width: 420px; margin-left:5px;" id="module_id" class="idls object">' . Getmodule($res['module_id']) . '</select></td>
						</tr>					
					</table>
				</div>					
				</fieldset>
				<fieldset style="width: 400px; float:left;">
					<legend>ზარის დაზუსტება</legend>
					<table id="" class="dialog-form-table" width="150px">
						<tr>
							<td><textarea  style="width: 400px; resize: none;" id="call_comment" class="idle" name="call_comment" cols="300" >' . $res['call_comment'] . '</textarea></td>
						</tr>
					</table>
					</fieldset>
					<fieldset style="width: 317px; margin-left:10px; height:55px;  float:left;">
					<legend>ზარის სტატუსი</legend>
					<table id="" class="dialog-form-table" width="150px">
						<tr>
							<td><select style="width: 310px; margin-left:5px;" id="call_status_id" class="idls object">' . Getcall_status($res['call_status_id']) . '</select></td>
						</tr>
					</table>
					</fieldset>
				';
    $data .= '
		   
				<fieldset style="margin-top: 5px;">
			    	<legend>დავალების ფორმირება</legend>
		
			    	<table class="dialog-form-table" style="width: 750px;">
						<tr>
							<td style="width: 180px;"><label for="task_type_id">დავალების ტიპი</label></td>
							<td style="width: 180px;"><label for="task_department_id">განყოფილება</label></td>
							<td style="width: 180px;"><label for="persons_id">პასუხისმგებელი პირი</label></td>
							<td style="width: 180px;"><label for="priority_id">პრიორიტეტი</label></td>
						</tr>
			    		<tr>
							<td><select style="width: 180px;" id="task_type_id" class="idls object">' . Gettask_type($res['task_type_id']) . '</select></td>
							<td><select style="width: 180px;" id="task_department_id" class="idls object">' . Getdepartment($res['task_department_id']) . '</select></td>
							<td><select style="width: 180px;" id="persons_id" class="idls object">' . Getpersons($res['persons_id']) . '</select></td>
							<td><select style="width: 180px;" id="priority_id" class="idls object">' . Getpriority($res['priority_id']) . '</select></td>
						</tr>
						</table>
						<table class="dialog-form-table" style="width: 750px;">
						<tr>
							<td style="width: 150px;"><label>შესრულების პერიოდი</label></td>
							<td style="width: 150px;"><label></label></td>
							<td style="width: 150px;"><label>კომენტარი</label></td>
							
						</tr>
						<tr>
							<td><input id="done_start_time" style="width: 150px; float:left;" class="idle" type="text" value="' . $res['done_start_time'] . '"><span style="margin-left:5px; ">დან</span></td>
					  		<td><input id="done_end_time" style="width: 150px; float:left;" class="idle" type="text" value="' . $res['done_end_time'] . '"><span style="margin-left:5px; ">მდე</span></td>
							<td>
								<textarea  style="width: 300px; resize: none;" id="comment" class="idle" name="content" cols="300" >' . $res['comment'] . '</textarea>
							</td>
						</tr>
					</table>
		        </fieldset>
			</div>
			<div>
				  </fieldset>
			</div>
			<div style="float: right;  width: 355px;">
				 
				<fieldset>
					<legend>მომართვის ავტორი</legend>
					<table style="height: 243px;">						
						<tr>
							<td style="width: 180px; color: #3C7FB1;">ტელეფონი</td>
							<td style="width: 180px; color: #3C7FB1;">პირადი ნომერი</td>
						</tr>
						<tr>
							<td>
								<input type="text" id="personal_phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_phone'] . '" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="personal_id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_id'] . '" />
							</td>					
						</tr>
						<tr>
							<td style="width: 180px; color: #3C7FB1;">სახელი</td>
							<td style="width: 180px; color: #3C7FB1;">ელ-ფოსტა</td>
						</tr>
						<tr >
							<td style="width: 180px;">
								<input type="text" id="personal_first_name" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_first_name'] . '" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="personal_mail" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_mail'] . '" />
							</td>			
						</tr>
						<tr>
							<td td style="width: 180px; color: #3C7FB1;">გვარი</td>
							<td td style="width: 180px; color: #3C7FB1;">დაბადების თარიღი</td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="personal_last_name" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_last_name'] . '" />		
							</td>
							<td td style="width: 180px;">
								<input type="text" id="personal_d_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_d_date'] . '" />		
							</td>
						</tr>
						<tr>
							<td td style="width: 180px; color: #3C7FB1;">ქალაქი</td>
							<td td style="width: 180px; color: #3C7FB1;">მისამართი</td>
						</tr>
						<tr>
							<td><select style="width: 165px;" id="personal_city" class="idls object">' . Getcity($res['personal_city']) . '</select></td>
							<td td style="width: 180px;">
								<input type="text" id="personal_addres" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_addres'] . '" />		
							</td>
						</tr>
						<tr>
							<td td style="width: 180px; color: #3C7FB1;">ოჯახური სტატუსი</td>
							<td td style="width: 180px; color: #3C7FB1;">პროფესია</td>
						</tr>
						<tr>
							<td><select style="width: 165px;" id="personal_status" class="idls object">' . Getfamily($res['personal_status']) . '</select></td>
							<td td style="width: 180px;">
								<input type="text" id="personal_profession" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_profession'] . '" />		
							</td>
						</tr>
					</table>
				</fieldset>	
				<!--fieldset>
					<legend>ყველა გაყიდვა (ბოლო 10)</legend>					
		                <table style="border:2px solid #85B1DE; width:100%;">
		                   		<tr style="background:#F2F2F2; ">	
									<th style="width:7%; padding:5px; border:1px solid #85B1DE;">#</th>
									<th style="border:1px solid #85B1DE; padding:5px;">თარიღი</th>
									<th style="border:1px solid #85B1DE; padding:5px;">მომხმარებელი</th>
									<th style="width:12%; padding:5px; border:1px solid #85B1DE;">ფასი</th>
									<th style="border:1px solid #85B1DE; padding:5px;">წიგნები</th>
								</tr>		
								<tr style="background: #FEFEFE">
										<td style="border:1px solid #85B1DE; padding:2px;">1</td>
										<td style="border:1px solid #85B1DE; padding:2px;">test</td>
										<td style="border:1px solid #85B1DE; padding:2px;">test</td>
										<td style="border:1px solid #85B1DE; padding:2px;">test</td>
										<td style="border:1px solid #85B1DE; padding:2px;">test</td>
								</tr>												
		                </table>
							<button id="read_more" style="float:right;">სრულად ნახვა</button>
				</fieldset-->					
				<fieldset style="margin-top: 10px; width: 150px; margin-left:10px; float: right;">
            		<legend>ფაილი</legend>
					<table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
     <tr>
      <td>
       <div class="file-uploader">
        <input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
        <button id="choose_button" class="center">აირჩიეთ ფაილი</button>
        <input id="hidden_inc" type="text" value="' . increment('action') . '" style="display: none;">
       </div>
      </td>
     </tr>
    </table>
        <table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
             <tr style="border-bottom: 1px solid #85b1de;">
              <td colspan="3">მიმაგრებული ფაილი</td>
             </tr>
    </table>
    <table id="file_div" style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">';
    while ($increm_row = mysql_fetch_assoc($increm)) {
        $data .= ' 
                <tr style="border-bottom: 1px solid #85b1de;">
                  <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td>              
                  <td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td>
                  <td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td>
                </tr>';
    }
    $data .= '
    </table>
				</fieldset>	
  					
						';
    if (!empty($res[phone])) {
        $data .= GetRecordingsSection($res);
    }
    $data .= '
	  		<button type="button" class="save-dialog" id="save-dialog" style="margin-top:10px;">შენახვა</button>
	  		</div>
			</div>
    </div>';
    return $data;
}
	</head>
	<body>
	<?php 
function &ref_return()
{
    global $a;
    $a = $a * 2;
    return $a;
}
$a = 10;
$b =& ref_return();
echo "a:{$a}/b:{$b} <br/>";
$b = 30;
echo "a:{$a}/b:{$b} <br/>";
function &increment()
{
    static $var = 0;
    $var++;
    return $var;
}
$a =& increment();
// var increments
increment();
$a++;
increment();
echo "a:{$a}/b:{$b} <br/>";
// 4($a increments with $var)
?>
	</body>
</html>
function get_innodb_array($text)
{
    $results = array('spin_waits' => array(), 'spin_rounds' => array(), 'os_waits' => array(), 'pending_normal_aio_reads' => null, 'pending_normal_aio_writes' => null, 'pending_ibuf_aio_reads' => null, 'pending_aio_log_ios' => null, 'pending_aio_sync_ios' => null, 'pending_log_flushes' => null, 'pending_buf_pool_flushes' => null, 'file_reads' => null, 'file_writes' => null, 'file_fsyncs' => null, 'ibuf_inserts' => null, 'ibuf_merged' => null, 'ibuf_merges' => null, 'log_bytes_written' => null, 'unflushed_log' => null, 'log_bytes_flushed' => null, 'pending_log_writes' => null, 'pending_chkp_writes' => null, 'log_writes' => null, 'pool_size' => null, 'free_pages' => null, 'database_pages' => null, 'modified_pages' => null, 'pages_read' => null, 'pages_created' => null, 'pages_written' => null, 'queries_inside' => null, 'queries_queued' => null, 'read_views' => null, 'rows_inserted' => null, 'rows_updated' => null, 'rows_deleted' => null, 'rows_read' => null, 'innodb_transactions' => null, 'unpurged_txns' => null, 'history_list' => null, 'current_transactions' => null, 'hash_index_cells_total' => null, 'hash_index_cells_used' => null, 'total_mem_alloc' => null, 'additional_pool_alloc' => null, 'last_checkpoint' => null, 'uncheckpointed_bytes' => null, 'ibuf_used_cells' => null, 'ibuf_free_cells' => null, 'ibuf_cell_count' => null, 'adaptive_hash_memory' => null, 'page_hash_memory' => null, 'dictionary_cache_memory' => null, 'file_system_memory' => null, 'lock_system_memory' => null, 'recovery_system_memory' => null, 'thread_hash_memory' => null, 'innodb_sem_waits' => null, 'innodb_sem_wait_time_ms' => null);
    $txn_seen = FALSE;
    foreach (explode("\n", $text) as $line) {
        $line = trim($line);
        $row = preg_split('/ +/', $line);
        # SEMAPHORES
        if (strpos($line, 'Mutex spin waits') === 0) {
            # Mutex spin waits 79626940, rounds 157459864, OS waits 698719
            # Mutex spin waits 0, rounds 247280272495, OS waits 316513438
            $results['spin_waits'][] = to_int($row[3]);
            $results['spin_rounds'][] = to_int($row[5]);
            $results['os_waits'][] = to_int($row[8]);
        } elseif (strpos($line, 'RW-shared spins') === 0) {
            # RW-shared spins 3859028, OS waits 2100750; RW-excl spins 4641946, OS waits 1530310
            $results['spin_waits'][] = to_int($row[2]);
            $results['spin_waits'][] = to_int($row[8]);
            $results['os_waits'][] = to_int($row[5]);
            $results['os_waits'][] = to_int($row[11]);
        } elseif (strpos($line, 'seconds the semaphore:') > 0) {
            # --Thread 907205 has waited at handler/ha_innodb.cc line 7156 for 1.00 seconds the semaphore:
            increment($results, 'innodb_sem_waits', 1);
            increment($results, 'innodb_sem_wait_time_ms', to_int($row[9]) * 1000);
        } elseif (strpos($line, 'Trx id counter') === 0) {
            # The beginning of the TRANSACTIONS section: start counting
            # transactions
            # Trx id counter 0 1170664159
            # Trx id counter 861B144C
            $results['innodb_transactions'] = make_bigint($row[3], $row[4]);
            $txn_seen = TRUE;
        } elseif (strpos($line, 'Purge done for trx') === 0) {
            # Purge done for trx's n:o < 0 1170663853 undo n:o < 0 0
            # Purge done for trx's n:o < 861B135D undo n:o < 0
            $purged_to = make_bigint($row[6], $row[7] == 'undo' ? null : $row[7]);
            $results['unpurged_txns'] = big_sub($results['innodb_transactions'], $purged_to);
        } elseif (strpos($line, 'History list length') === 0) {
            # History list length 132
            $results['history_list'] = to_int($row[3]);
        } elseif ($txn_seen && strpos($line, '---TRANSACTION') === 0) {
            # ---TRANSACTION 0, not started, process no 13510, OS thread id 1170446656
            increment($results, 'current_transactions', 1);
            if (strpos($line, 'ACTIVE') > 0) {
                increment($results, 'active_transactions', 1);
            }
        } elseif ($txn_seen && strpos($line, '------- TRX HAS BEEN') === 0) {
            # ------- TRX HAS BEEN WAITING 32 SEC FOR THIS LOCK TO BE GRANTED:
            increment($results, 'innodb_lock_wait_secs', to_int($row[5]));
        } elseif (strpos($line, 'read views open inside InnoDB') > 0) {
            # 1 read views open inside InnoDB
            $results['read_views'] = to_int($row[0]);
        } elseif (strpos($line, 'mysql tables in use') === 0) {
            # mysql tables in use 2, locked 2
            increment($results, 'innodb_tables_in_use', to_int($row[4]));
            increment($results, 'innodb_locked_tables', to_int($row[6]));
        } elseif ($txn_seen && strpos($line, 'lock struct(s)') > 0) {
            # 23 lock struct(s), heap size 3024, undo log entries 27
            # LOCK WAIT 12 lock struct(s), heap size 3024, undo log entries 5
            # LOCK WAIT 2 lock struct(s), heap size 368
            if (strpos($line, 'LOCK WAIT') === 0) {
                increment($results, 'innodb_lock_structs', to_int($row[2]));
                increment($results, 'locked_transactions', 1);
            } else {
                increment($results, 'innodb_lock_structs', to_int($row[0]));
            }
        } elseif (strpos($line, ' OS file reads, ') > 0) {
            # 8782182 OS file reads, 15635445 OS file writes, 947800 OS fsyncs
            $results['file_reads'] = to_int($row[0]);
            $results['file_writes'] = to_int($row[4]);
            $results['file_fsyncs'] = to_int($row[8]);
        } elseif (strpos($line, 'Pending normal aio reads:') === 0) {
            # Pending normal aio reads: 0, aio writes: 0,
            $results['pending_normal_aio_reads'] = to_int($row[4]);
            $results['pending_normal_aio_writes'] = to_int($row[7]);
        } elseif (strpos($line, 'ibuf aio reads') === 0) {
            #  ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
            $results['pending_ibuf_aio_reads'] = to_int($row[3]);
            $results['pending_aio_log_ios'] = to_int($row[6]);
            $results['pending_aio_sync_ios'] = to_int($row[9]);
        } elseif (strpos($line, 'Pending flushes (fsync)') === 0) {
            # Pending flushes (fsync) log: 0; buffer pool: 0
            $results['pending_log_flushes'] = to_int($row[4]);
            $results['pending_buf_pool_flushes'] = to_int($row[7]);
        } elseif (strpos($line, 'Ibuf for space 0: size ') === 0) {
            # Older InnoDB code seemed to be ready for an ibuf per tablespace.  It
            # had two lines in the output.  Newer has just one line, see below.
            # Ibuf for space 0: size 1, free list len 887, seg size 889, is not empty
            # Ibuf for space 0: size 1, free list len 887, seg size 889,
            $results['ibuf_used_cells'] = to_int($row[5]);
            $results['ibuf_free_cells'] = to_int($row[9]);
            $results['ibuf_cell_count'] = to_int($row[12]);
        } elseif (strpos($line, 'Ibuf: size ') === 0) {
            # Ibuf: size 1, free list len 4634, seg size 4636,
            $results['ibuf_used_cells'] = to_int($row[2]);
            $results['ibuf_free_cells'] = to_int($row[6]);
            $results['ibuf_cell_count'] = to_int($row[9]);
        } elseif (strpos($line, ' merged recs, ') > 0) {
            # 19817685 inserts, 19817684 merged recs, 3552620 merges
            $results['ibuf_inserts'] = to_int($row[0]);
            $results['ibuf_merged'] = to_int($row[2]);
            $results['ibuf_merges'] = to_int($row[5]);
        } elseif (strpos($line, 'Hash table size ') === 0) {
            # In some versions of InnoDB, the used cells is omitted.
            # Hash table size 4425293, used cells 4229064, ....
            # Hash table size 57374437, node heap has 72964 buffer(s) <-- no used cells
            $results['hash_index_cells_total'] = to_int($row[3]);
            $results['hash_index_cells_used'] = strpos($line, 'used cells') > 0 ? to_int($row[6]) : '0';
        } elseif (strpos($line, " log i/o's done, ") > 0) {
            # 3430041 log i/o's done, 17.44 log i/o's/second
            # 520835887 log i/o's done, 17.28 log i/o's/second, 518724686 syncs, 2980893 checkpoints
            # TODO: graph syncs and checkpoints
            $results['log_writes'] = to_int($row[0]);
        } elseif (strpos($line, " pending log writes, ") > 0) {
            # 0 pending log writes, 0 pending chkp writes
            $results['pending_log_writes'] = to_int($row[0]);
            $results['pending_chkp_writes'] = to_int($row[4]);
        } elseif (strpos($line, "Log sequence number") === 0) {
            # This number is NOT printed in hex in InnoDB plugin.
            # Log sequence number 13093949495856 //plugin
            # Log sequence number 125 3934414864 //normal
            $results['log_bytes_written'] = isset($row[4]) ? make_bigint($row[3], $row[4]) : to_int($row[3]);
        } elseif (strpos($line, "Log flushed up to") === 0) {
            # This number is NOT printed in hex in InnoDB plugin.
            # Log flushed up to   13093948219327
            # Log flushed up to   125 3934414864
            $results['log_bytes_flushed'] = isset($row[5]) ? make_bigint($row[4], $row[5]) : to_int($row[4]);
        } elseif (strpos($line, "Last checkpoint at") === 0) {
            # Last checkpoint at  125 3934293461
            $results['last_checkpoint'] = isset($row[4]) ? make_bigint($row[3], $row[4]) : to_int($row[3]);
        } elseif (strpos($line, "Total memory allocated") === 0) {
            # Total memory allocated 29642194944; in additional pool allocated 0
            $results['total_mem_alloc'] = to_int($row[3]);
            $results['additional_pool_alloc'] = to_int($row[8]);
        } elseif (strpos($line, 'Adaptive hash index ') === 0) {
            #   Adaptive hash index 1538240664 	(186998824 + 1351241840)
            $results['adaptive_hash_memory'] = to_int($row[3]);
        } elseif (strpos($line, 'Page hash           ') === 0) {
            #   Page hash           11688584
            $results['page_hash_memory'] = to_int($row[2]);
        } elseif (strpos($line, 'Dictionary cache    ') === 0) {
            #   Dictionary cache    145525560 	(140250984 + 5274576)
            $results['dictionary_cache_memory'] = to_int($row[2]);
        } elseif (strpos($line, 'File system         ') === 0) {
            #   File system         313848 	(82672 + 231176)
            $results['file_system_memory'] = to_int($row[2]);
        } elseif (strpos($line, 'Lock system         ') === 0) {
            #   Lock system         29232616 	(29219368 + 13248)
            $results['lock_system_memory'] = to_int($row[2]);
        } elseif (strpos($line, 'Recovery system     ') === 0) {
            #   Recovery system     0 	(0 + 0)
            $results['recovery_system_memory'] = to_int($row[2]);
        } elseif (strpos($line, 'Threads             ') === 0) {
            #   Threads             409336 	(406936 + 2400)
            $results['thread_hash_memory'] = to_int($row[1]);
        } elseif (strpos($line, 'innodb_io_pattern   ') === 0) {
            #   innodb_io_pattern   0 	(0 + 0)
            $results['innodb_io_pattern_memory'] = to_int($row[1]);
        } elseif (strpos($line, "Buffer pool size ") === 0) {
            # The " " after size is necessary to avoid matching the wrong line:
            # Buffer pool size        1769471
            # Buffer pool size, bytes 28991012864
            $results['pool_size'] = to_int($row[3]);
        } elseif (strpos($line, "Free buffers") === 0) {
            # Free buffers            0
            $results['free_pages'] = to_int($row[2]);
        } elseif (strpos($line, "Database pages") === 0) {
            # Database pages          1696503
            $results['database_pages'] = to_int($row[2]);
        } elseif (strpos($line, "Modified db pages") === 0) {
            # Modified db pages       160602
            $results['modified_pages'] = to_int($row[3]);
        } elseif (strpos($line, "Pages read ahead") === 0) {
            # Must do this BEFORE the next test, otherwise it'll get fooled by this
            # line from the new plugin (see samples/innodb-015.txt):
            # Pages read ahead 0.00/s, evicted without access 0.06/s
            # TODO: No-op for now, see issue 134.
        } elseif (strpos($line, "Pages read") === 0) {
            # Pages read 15240822, created 1770238, written 21705836
            $results['pages_read'] = to_int($row[2]);
            $results['pages_created'] = to_int($row[4]);
            $results['pages_written'] = to_int($row[6]);
        } elseif (strpos($line, 'Number of rows inserted') === 0) {
            # Number of rows inserted 50678311, updated 66425915, deleted 20605903, read 454561562
            $results['rows_inserted'] = to_int($row[4]);
            $results['rows_updated'] = to_int($row[6]);
            $results['rows_deleted'] = to_int($row[8]);
            $results['rows_read'] = to_int($row[10]);
        } elseif (strpos($line, " queries inside InnoDB, ") > 0) {
            # 0 queries inside InnoDB, 0 queries in queue
            $results['queries_inside'] = to_int($row[0]);
            $results['queries_queued'] = to_int($row[4]);
        }
    }
    foreach (array('spin_waits', 'spin_rounds', 'os_waits') as $key) {
        $results[$key] = to_int(array_sum($results[$key]));
    }
    $results['unflushed_log'] = big_sub($results['log_bytes_written'], $results['log_bytes_flushed']);
    $results['uncheckpointed_bytes'] = big_sub($results['log_bytes_written'], $results['last_checkpoint']);
    return $results;
}
 /**
  * Recursive increment routine
  *
  * @param array &$stats Stats
  * @param array $parts  Parts
  *
  * @return array
  */
 function increment(&$stats, $parts)
 {
     if (!isset($stats)) {
         $stats = array("count" => null, "items" => null);
     }
     $stats["count"]++;
     if ($first = array_shift($parts)) {
         increment($stats["items"][$first], $parts);
     }
 }
Exemple #25
0
<?php

## Передача параметров по значению.
function increment($a)
{
    echo "Текущее значение: {$a}<br />";
    $a++;
    echo "После увеличения: {$a}<br />";
}
# ...
$num = 10;
echo "Начальное значение: {$num}<br />";
increment($num);
echo "После вызова функции: {$num}<br />";
function GetPage($res = '', $number)
{
    $num = 0;
    if ($res[phone] == "") {
        $num = $number;
    } else {
        $num = $res[phone];
    }
    if ($res[id] != '') {
        $dis = 'disabled="disabled"';
    } else {
        $dis = '';
    }
    $increm = mysql_query("\tSELECT  `name`,\r\n\t\t\t\t\t\t\t\t\t`rand_name`\r\n\t\t\t\t\t\t\tFROM \t`file`\r\n\t\t\t\t\t\t\tWHERE   `incomming_call_id` = {$res['id']}\r\n\t\t\t");
    $data .= '
	<!-- jQuery Dialog -->
    <div id="add-edit-goods-form" title="საქონელი">
    	<!-- aJax -->
	</div>
	<div id="dialog-form">
			<div style="float: left; width: 673px;">	
				<fieldset >
			    	<legend>ძირითადი ინფორმაცია</legend>
						<tr>
							<label for="req_num">დამფორმირებელი</label>
							<label for="req_num">:</label>
							<label for="req_num">' . $res['operator'] . '</label>
						</tr>
			    	<table width="100%" class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="req_num">მომართვა №</label></td>
							<td style="width: 180px !important;"><label for="req_data">თარიღი</label></td>
							<td style="width: 180px;"><label for="req_phone">ტელეფონი</label></td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField user_id\'" value="' . $res['id'] . '" disabled="disabled" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="c_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField date\'" value="' . $res['call_date'] . '" disabled="disabled" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $num . '" disabled="disabled"/>
							</td>
							<td style="width: 69px;">
								
							</td>
						</tr>
						<tr>
							<td style="width: 180px;"><label for="d_number">ზარის ტიპი</label></td>
							<td style="width: 180px;"><label for="d_number">კატეგორია</label></td>
							<td style="width: 180px;"><label for="d_number">ქვე-კატეგოტია</label></td>
							<td ></td>
						</tr>
						<tr>
							<td style="width: 180px;"><select id="call_type_id" class="idls object"disabled="disabled">' . Getcall_type($res['call_type_id']) . '</select></td>
							<td style="width: 180px;"><select id="category_parent_id" class="idls object"disabled="disabled">' . Getcategory($res['category_parent_id']) . '</select></td>
							<td style="width: 180px;"><select id="category_id" class="idls object"disabled="disabled">' . Getcategory1_edit($res['category_id']) . '</select></td>
							<td ></td>
						</tr>
					</table>';
    $data .= '<table id="additional" class="hidden dialog-form-table" width="100%">

						<tr id="aaaa">
							<td style="width: 180px;"><label pey_label1 for="d_number">ტრანზაქციის ფორმა</label></td>
							<td style="width: 180px;"><label id="bank_label" for="d_number">მომსახურე ბანკი</label></td>
							<td style="width: 180px;"><label id="pey_label" for="d_number">აპარატის ტიპი</label></td>
							<td style="width: 106px;"></td>
						</tr>
						<tr id="c">
							<td style="width: 180px;"><select id="pay_type_id" class="idls object"disabled="disabled">' . Getpay_type($res['pay_type_id']) . '</select></td>
							<td style="width: 180px;"><select id="bank_id" class="idls object"disabled="disabled">' . Get_bank($res['bank_id']) . '</select></td>
							<td style="width: 180px;"><select id="pay_aparat_id" class="idls object"disabled="disabled">' . Getpay_aparat($res['pay_aparat_id']) . '</select></td>
							<td style="width: 106px;"></td>
						</tr>
						<tr id="bbbb">
							<td style="width: 180px;"><label id="card_label" for="d_number">ბარათის ტიპი</label></td>
							<td style="width: 180px;"></td>
							<td style="width: 180px;"></td>
							<td style="width: 106px;"></td>
						</tr>
						<tr id="d" >
							<td style="width: 180px;"><select id="card_type_id" class="idls object"disabled="disabled">' . Getcard_type($res['card_type_id']) . '</select></td>
							<td style="width: 180px;"></td>
							<td style="width: 180px;"></td>
							<td style="width: 106px;"></td>
						</tr>
					</table>';
    $data .= '<table width="100%" class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="req_num">პრობლემის თარიღი</label></td>
							<td style="width: 180px;"><label for="d_number">სტატუსი</label></td>
							<td style="width: 180px;"><label for="d_number">ობიექტი</label></td>			
							<td ></td>
						</tr>
						<tr>	
							<td style="width: 180px;"> <input type="text" id="problem_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['problem_date'] . '"disabled="disabled" /></td>
							<td style="width: 180px;"><select id="call_status_id" class="idls object"disabled="disabled"disabled="disabled">' . Getcall_status($res['status']) . '</select></td>
							<td style="width: 180px;"><select id="object_id" class="idls object"disabled="disabled">' . Getobject($res['object_id']) . '</select></td>	
							<td ></td>
						</tr>
						
						<tr>
							<td style="width: 180px;"><label for="req_num">ინფორმაციის წყარო</label></td>
							<td style="width: 180px;"></td>
							<td style="width: 180px;"></td>			
							<td ></td>
						</tr>
						<tr>	
							<td style="width: 180px;"><select id="source_id" class="idls object"disabled="disabled">' . Getsource($res['source_id']) . '</select></td>
							<td style="width: 180px;"></td>
							<td style="width: 180px;"></td>	
							<td ></td>
						</tr>
						<tr>
							<td style="width: 180px;"><label for="content">საუბრის შინაარსი</label></td>
						</tr>
						<tr>
							
							<td colspan="6">	
								<textarea  style="width: 641px; resize: none;" id="call_content" class="idle" name="call_content" cols="300" rows="4"disabled="disabled">' . $res['call_content'] . '</textarea>
							</td>
						</tr>			
					</table>
				</fieldset >
		   
				<fieldset style="margin-top: 5px;">
			    	<legend>დავალების ფორმირება</legend>
		
			    	<table class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="d_number">დავალების ტიპი</label></td>
							<td style="width: 180px;"><label for="d_number">განყოფილება</label></td>
							<td style="width: 180px;"><label for="d_number">პასუხისმგებელი პირი</label></td>
						</tr>
			    		<tr>
							<td style="width: 180px;" id="task_type_change"><select id="task_type_id" class="idls object"disabled="disabled">' . Gettask_type($res['task_type_id']) . '</select></td>
							<td style="width: 180px;"><select id="task_department_id" class="idls object"disabled="disabled">' . Getdepartment($res['task_department_id']) . '</select></td>
							<td style="width: 180px;"><select id="persons_id" class="idls object"disabled="disabled">' . Getpersons($res['persons_id']) . '</select></td>
						</tr>
						<tr>
							<td style="width: 180px;"><label for="d_number">პრიორიტეტები</label></td>
							<td style="width: 180px;"><label for="d_number">მაკონტროლებელი</label></td>
							<td style="width: 180px;"><label for="d_number">სხვა ნომერი</label></td>
						</tr>
						<tr>
							<td style="width: 180px;"><select id="priority_id" class="idls object">' . Getpriority($res['priority_id']) . '</select></td>
							<td style="width: 180px;"><select id="controler_id" class="idls object">' . Get_control($res['control_user_id']) . '</select></td>
							<td style="width: 180px;">
								<input type="text" id="task_phone" class="idle" onblur="this.className=\'idle\'" value="' . $res['task_phone'] . '" />	
							</td>
						</tr>
						<tr>
							<td style="width: 180px;"><label for="content">პრობლემის გადაწყვეტა</label></td>
						</tr>
						<tr>
							
							<td colspan="6">	
								<textarea  style="width: 641px; resize: none;" id="problem_coment" class="idle" name="call_content" cols="300" rows="4"disabled="disabled">' . $res['problem_comment'] . '</textarea>
							</td>
						</tr>	
					</table>
		        </fieldset>
			</div>
			<div>
				  </fieldset>
			</div>
			<div style="float: right;  width: 355px;">
				 <fieldset>
					<legend>მომართვის ავტორი</legend>
					<table style="height: 119px;">
						<tr>
							<td style="width: 180px;">PIN კოდი</td>
							<td style="width: 180px;"></td>
						</tr>
						<tr>
							<td style="width: 180px;"><input type="text" id="personal_pin" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_pin'] . '"' . $dis . ' disabled="disabled"/></td>
							<td style="width: 180px;" class="hidden friend">
							</td>
						</tr>
						<tr>
							<td style="width: 180px;">პირადი ნომერი</td>
							<td style="width: 180px;"></td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="personal_id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['personal_id'] . '" ' . $dis . 'disabled="disabled"/>
							</td>
							<td style="width: 180px;"></td>
						</tr>
					</table>
				</fieldset>
				<div id="additional_info">';
    $data .= '</div>';
    $data .= GetRecordingsSection1($res);
    $data .= GetRecordingsSection($res);
    $data .= '		<fieldset>
					<legend>დამატებითი ინფორმაცია</legend> 
					<table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
					<tr>
						<td>
							<div class="file-uploader">
								<input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
								<button id="choose_button" class="center">აირჩიეთ ფაილი</button>
								<input id="hidden_inc" type="text" value="' . increment('incomming_call') . '" style="display: none;">
							</div>
						</td>
					</tr>
				</table>
			     <table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
			          <tr style="border-bottom: 1px solid #85b1de;">
			           <td colspan="3">მიმაგრებული ფაილი</td>
			          </tr>
				</table>
				<table id="file_div" style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">';
    while ($increm_row = mysql_fetch_assoc($increm)) {
        $data .= ' 
								        <tr style="border-bottom: 1px solid #85b1de;">
								          <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td>													 
								          <td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td>
								          <td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td>
								        </tr>';
    }
    $data .= '
	 		</table>
				</fieldset>
			</div>
	 		<input id="hidden_user" type="text" value="' . $res['user_id'] . '" style="display: none;">
    </div>';
    return $data;
}
Exemple #27
0
            return false;
        }
        if (!$has3Consecutive) {
            if (ord($char) - ord($prev) === 1) {
                $numConsecutive++;
                if ($numConsecutive >= 3) {
                    $has3Consecutive = true;
                }
            } else {
                $numConsecutive = 1;
            }
        }
        if ($numPairs < 2) {
            if ($char === $prev) {
                $numRepeats++;
                if ($numRepeats % 2 === 1) {
                    $numPairs++;
                }
            } else {
                $numRepeats = 0;
            }
        }
        $prev = $char;
    }
    return $has3Consecutive && $numPairs >= 2;
}
$output = increment($input);
while (!isValid($output)) {
    $output = increment($output);
}
echo 'Answer: ' . $output . PHP_EOL;
function GetPage($res = '', $number)
{
    $c_date = date('Y-m-d H:i:s');
    $num = 0;
    if ($res[source] == "") {
        $num = $number;
    } else {
        $num = $res[source];
    }
    if ($res[date] == "") {
        $date = $c_date;
    } else {
        $date = $res[date];
    }
    if ($res[id] == "") {
        $incr = increment('incomming_call');
    } else {
        $incr = $res[id];
    }
    $increm = mysql_query("\tSELECT  `name`,\r\n\t\t\t\t\t\t\t\t\t`rand_name`\r\n\t\t\t\t\t\t\tFROM \t`file`\r\n\t\t\t\t\t\t\tWHERE   `incomming_call_id` = {$res['id']}");
    $data .= '
	<!-- jQuery Dialog -->
    <div id="add-edit-goods-form" title="საქონელი">
    	<!-- aJax -->
	</div>
	<div id="dialog-form">
			<div style="float: left; width: 673px;">	
				<fieldset >
			    	<legend>ძირითადი ინფორმაცია</legend>
					<tr>
						<label for="req_num">დამფორმირებელი</label>
						<label for="req_num">:</label>
						<label for="req_num">' . $res['operator'] . '</label>
					</tr>
			    	<table width="100%" class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="req_num">მომართვა №</label></td>
							<td style="width: 180px !important;"><label for="req_data">თარიღი</label></td>
							<td style="width: 180px;"><label for="req_phone">ტელეფონი</label></td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="id" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField user_id\'" value="' . $res['id'] . '" disabled="disabled" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="call_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField date\'" value="' . $date . '" disabled="disabled" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $num . '" disabled="disabled"/>
							</td>
							<td style="width: 69px;">
								
							</td>
						</tr>
						<tr>
							<td style="width: 180px;"><label for="d_number">კატეგორია       <span style="color: #FA0000;">*</span></label></td>
							<td style="width: 180px;"><label for="d_number">ქვე-კატეგორია</label></td>
							<td style="width: 180px;"><label for="d_number"></label></td>
							<td ></td>
						</tr>
						<tr>
							<td style="width: 180px;"><select id="category_id" class="idls object">' . Getcategory($res['call_category_id']) . '</select></td>
							<td style="width: 180px;"><select id="category_parent_id" class="idls object">' . Getcategory1_edit($res['call_subcategory_id'], $res['call_category_id']) . '</select></td>
							<td style="width: 180px;"></td>
							<td ></td>
						</tr>
					</table>
						<tr style="margin-top: 20px;">
							<td style="width: 180px; "><label for="content">დამატებითი ინფორმაცია</label></td>
						</tr>
						<tr>
							
							<td colspan="6">
								<div id="content">		
								<textarea  style="width: 641px; resize: vertical; margin-top: 5px;" id="call_content" class="idle" name="call_content" cols="300" rows="2">' . $res['call_content'] . '</textarea>
								</div>
							</td>
						</tr>			
					</table>
				</fieldset >
		   
				<fieldset style="margin-top: 5px;">
			    	<legend>დავალების ფორმირება</legend>
		
			    	<table class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="d_number">პასუხისმგებელი პირი</label></td>
							<td style="width: 180px;"><label for="d_number">დავალების ტიპი</label></td>
							<td style="width: 180px;"><label for="d_number">სხვა ნომერი</label></td>
							
						</tr>
			    		<tr>
							<td style="width: 180px;"><select id="persons_id" class="idls object">' . Getpersons($res['responsible_user_id']) . '</select></td>
							<td style="width: 180px;"><select id="task_type_id" class="idls object">' . Gettask_type($res['task_type_id']) . '</select></td>
							<td style="width: 180px;">
								<input type="text" id="out_phone" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['task_phone'] . '" />
							</td>
						</tr>
						<tr>
							<td style="width: 180px;"><label for="content">შინაარსი</label></td>
						</tr>
						<tr>
							
							<td colspan="6">	
								<textarea  style="width: 641px; resize: vertical;" id="problem_coment" class="idle" name="call_content" cols="300" rows="2">' . $res['problem_comment'] . '</textarea>
							</td>
						</tr>	
					</table>
		        </fieldset>
				
			</div>
			<div style="float: left; margin-left: 5px; width: 190px;">
				 <fieldset>
					<legend>მომართვის ავტორი</legend>
					<table style="height: 190px;">
						<tr>
							<td style="width: 180px;">რეგიონი <span style="color: #FA0000;">*</span></td>
						</tr>
						<tr>
							<td style="width: 180px;"><select id="region_id" class="idls object">' . Get_region($res['region_id']) . '</select></td>
						</tr>
						<tr>
							<td style="width: 180px;">ქალაქი</td>
						</tr>
						<tr>
							<td style="width: 180px;"><select id="sity_id" class="idls object">' . Get_city_edit($res['city_id'], $res['region_id']) . '</select></td>
						</tr>
						<tr>
							<td style="width: 180px;">DY კოდი</td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="DY_code" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['DY_code'] . '"/>
							</td>
						</tr>
					</table>
				</fieldset>
				<div id="additional_info">';
    $data .= '</div>';
    $data .= GetRecordingsSection($res);
    $data .= '	<fieldset style="display: inline-flex; width: 168px;">
					<legend>ფაილი</legend> 
					<table style="float: left; border: 1px solid #85b1de; width: 168px; text-align: center;">
					<tr>
						<td>
							<div class="file-uploader">
								<input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
								<button id="choose_button" class="center">აირჩიეთ ფაილი</button>
								<input id="hidden_inc" type="text" value="' . increment('incomming_call') . '" style="display: none;">
							</div>
						</td>
					</tr>
				</table>
			     <table style="float: left; border: 1px solid #85b1de; width: 168px; text-align: center;">
			          <tr style="border-bottom: 1px solid #85b1de;">
			           <td colspan="3">მიმაგრებული ფაილი</td>
			          </tr>
				</table>
				<table id="file_div" style="float: left; border: 1px solid #85b1de; width: 168px; text-align: center;">';
    while ($increm_row = mysql_fetch_assoc($increm)) {
        $data .= ' 
								        <tr style="border-bottom: 1px solid #85b1de;">
								          <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td>													 
								          <td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td>
								          <td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td>
								        </tr>';
    }
    $data .= '
	 		</table>
				</fieldset>
	 		</div>
	 		<input id="hidden_user" type="text" value="' . $res['user_id'] . '" style="display: none;">
	 		<input id="sms_inc_increm_id" type="text" value="' . $incr . '" style="display: none;">
	 		<input id="send_male_status" type="text" value="true" style="display: none;">
	 		
    </div>';
    return $data;
}
Exemple #29
0
function GetPage($res = '', $number)
{
    $c_date = date('Y-m-d H:i:s');
    $num = 0;
    if ($res[phone] == "") {
        $num = $number;
    } else {
        $num = $res[phone];
    }
    $increm = mysql_query("\tSELECT  `name`,\n                    \t            `rand_name`,\n                    \t            `id`\n                    \t    FROM \t`file`\n                    \t    WHERE   `incomming_call_id` = {$res['id']}\n                    \t    ");
    $data .= '
	<!-- jQuery Dialog -->
    <div id="add-edit-goods-form" title="საქონელი">
    	<!-- aJax -->
	</div>
	<div id="dialog-form">
			<div style="float: left; width: 800px;">	
				<fieldset >
				<fieldset style="width:300px; float:left;">
			    	<legend>ძირითადი ინფორმაცია</legend>
		
			    	<table width="500px" class="dialog-form-table">
						<tr>
							<td style="width: 180px;"><label for="">მომართვა №</label></td>
							<td style="width: 180px;"><label for="">თარიღი</label></td>
						</tr>							
						
						<tr>
							<td style="width: 180px;">
								<input type="text" id="id" class="idle" onblur="this.className=\'idle\'"  value="' . ($res['id'] != '' ? $res['id'] : increment('incomming_call')) . '" disabled="disabled" />
								<input style="display:none;" type="text" id="h_id" class="idle" onblur="this.className=\'idle\'"  value="' . $res['id'] . '" disabled="disabled" />
							</td>
							<td style="width: 180px;">
								<input type="text" id="c_date" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField date\'" value="' . ($res['call_date'] != '' ? $res['call_date'] : $c_date) . '" disabled="disabled" />
							</td>				
						</tr>
						<tr>
							<td style="width: 180px;"><label for="phone">ტელეფონი</label></td>							
							<td><label for="person_name">აბონენტის სახელი</label></td>
						</tr>
						<tr>
							<td style="width: 180px;">
								<input type="text" id="phone" class="idle" onblur="this.className=\'idle\'"  value="' . $num . '"  />
							</td>
							<td style="width: 69px;">
								<input type="text" id="person_name" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['first_name'] . '" />
							</td>	
						</tr>
						<tr>
							
							<td>
							</td>
						</tr>
						<tr>
							
							<td style="width: 69px;">
								<button id="button_calls" class="calls">ნომრები</button>
							</td>
						</tr>				
					</table>
				</fieldset>
				<fieldset style="width:220px; float:left; margin-left:10px; ">
			    	<legend>მომართვის ავტორი</legend>
					<table id="" class="dialog-form-table" width="220px">						
						<tr>
							<td style="width: 220px;"><input style="float:left;" type="radio" name="x" value="1" ' . ($res['type_id'] == '1' ? "checked" : "") . ' checked><span style="margin-top:5px; display:block;">ფიზიკური</span></td>
					  		<td style="width: 220px;"><input style="float:left;" type="radio" name="x" value="2" ' . ($res['type_id'] == '2' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">იურიდიული</span></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:220px; float:left; margin-left:10px; ">
			    	<legend>ზარის ტიპი</legend>
					<table id="" class="dialog-form-table" width="220px">						
						<tr>
							<td style="width: 220px;"><input style="float:left;" type="radio" name="xx" value="1" ' . ($res['call_type_id'] == '1' ? "checked" : "") . ' checked><span style="margin-top:5px; display:block;">ინფორმაცია</span></td>
					  		<td style="width: 220px;"><input style="float:left;" type="radio" name="xx" value="2" ' . ($res['call_type_id'] == '2' ? "checked" : "") . ' ><span style="margin-top:5px; display:block;"">პრეტენზია</span></td>
					  	</tr>
					  	<tr>
					  		<td style="width: 220px;"><input style="float:left;" type="radio" name="xx" value="3" ' . ($res['call_type_id'] == '3' ? "checked" : "") . '><span style="margin-top:5px; display:block;"">სხვა</span></td>
						</tr>
					</table>
				</fieldset>
				<fieldset style="width:756px; float:left;">
			    	<legend>ინფორმაცია</legend>
					<table id="" class="dialog-form-table" width="500px">
					  	<tr>
					  		<td style="width: 600px;">
					  		    <label style="float:left; margin-top:7px; margin-right:5px;">სრულწლოვანი (18)</label>
					  		    <input style="float:left;" type="radio" name="status_1" value="1" ' . ($res['status_1'] == '1' ? "checked" : "") . '><span style="margin-top:8px; display:block; float: left;"">კი</span>
					  		    <input style="float:left;" type="radio" name="status_1" value="2" ' . ($res['status_1'] == '2' ? "checked" : "") . '><span style="margin-top:8px; display:block; float: left;"">არა</span>
					  		</td>
					  		<td style="width: 400px;">
					  		    <label style="float:left; margin-top:7px; margin-right:5px;">მწეველი</label>
					  		    <input style="float:left;" type="radio" name="status_2" value="1" ' . ($res['status_2'] == '1' ? "checked" : "") . '><span style="margin-top:8px; display:block; float: left;"">კი</span>
					  		    <input style="float:left;" type="radio" name="status_2" value="2" ' . ($res['status_2'] == '2' ? "checked" : "") . '><span style="margin-top:8px; display:block; float: left;"">არა</span>
					  		</td>
					  	</tr>
					</table>
				</fieldset>
				
				
				<fieldset style="width: 400px; float:left;">
					<legend>ზარის დაზუსტება</legend>
					<table id="" class="dialog-form-table" width="150px">
						<tr>
							<td><textarea  style="width: 400px; height: 50px;" id="call_comment" class="idle" name="call_comment" cols="300" >' . $res['call_comment'] . '</textarea></td>
						</tr>
					</table>
					</fieldset>
					<fieldset style="width: 317px; margin-left:10px; height:55px;  float:left;">
					<legend>მომართვის შინაარსი</legend>
					<table id="" class="dialog-form-table" width="150px">
						<tr>
							<td><select style="width: 310px; margin-left:5px;" id="call_status_id" class="idls object">' . Getcall_status($res['call_status_id']) . '</select></td>
						</tr>
					</table>				    
					</fieldset>';
    $data .= '
		   
				<fieldset style="margin-top: 5px;">
			    	<legend>დავალების ფორმირება</legend>
		
			    	<table class="dialog-form-table" style="width: 750px;">
						<tr>
							<td style="width: 180px;"><label for="task_type_id">დავალების ტიპი</label></td>
							<td style="width: 180px;"><label for="task_department_id">განყოფილება</label></td>
							<td style="width: 180px;"><label for="persons_id">პასუხისმგებელი პირი</label></td>
							<td style="width: 180px;"><label for="priority_id">პრიორიტეტი</label></td>
						</tr>
			    		<tr>
							<td><select style="width: 180px;" id="task_type_id" class="idls object">' . Gettask_type($res['task_type_id']) . '</select></td>
							<td><select style="width: 180px;" id="task_department_id" class="idls object">' . Getdepartment($res['task_department_id']) . '</select></td>
							<td><select style="width: 180px;" id="persons_id" class="idls object">' . Getpersons($res['persons_id']) . '</select></td>
							<td><select style="width: 180px;" id="priority_id" class="idls object">' . Getpriority($res['priority_id']) . '</select></td>
						</tr>
						</table>
						<table class="dialog-form-table" style="width: 750px;">
						<tr>
							<td style="width: 150px;"><label>შესრულების პერიოდი</label></td>
							<td style="width: 150px;"><label></label></td>
							<td style="width: 150px;"><label>კომენტარი</label></td>
							
						</tr>
						<tr>
							<td><input id="done_start_time" style="width: 150px; float:left;" class="idle" type="text" value="' . $res['done_start_time'] . '"><span style="margin-left:5px; ">დან</span></td>
					  		<td><input id="done_end_time" style="width: 150px; float:left;" class="idle" type="text" value="' . $res['done_end_time'] . '"><span style="margin-left:5px; ">მდე</span></td>
							<td>
								<textarea  style="width: 300px; resize: none;" id="comment" class="idle" name="content" cols="300" >' . $res['comment'] . '</textarea>
							</td>
						</tr>
					</table>
		        </fieldset>
			</div>
			<div>
				  </fieldset>
			</div>
			<div style="float: right;  width: 355px;">
				 
				<fieldset style="width: 334px; float:left;">
					   <legend>ტაგები</legend>
							    <div  id="tree">
				    ' . GetTree() . '
				        </div>
				</fieldset>					
				<fieldset style="margin-top: 10px; width: 150px; margin-left:10px; float: right;">
            		<legend>ფაილი</legend>
					<table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
     <tr>
      <td>
       <div class="file-uploader">
        <input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
        <button id="choose_button" class="center">აირჩიეთ ფაილი</button>
        <input id="hidden_inc" type="text" value="' . increment('action') . '" style="display: none;">
       </div>
      </td>
     </tr>
    </table>
        <table style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">
             <tr style="border-bottom: 1px solid #85b1de;">
              <td colspan="3">მიმაგრებული ფაილი</td>
             </tr>
    </table>
    <table id="file_div" style="float: right; border: 1px solid #85b1de; width: 150px; text-align: center;">';
    while ($increm_row = mysql_fetch_assoc($increm)) {
        $data .= ' 
                <tr style="border-bottom: 1px solid #85b1de;">
                  <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td>              
                  <td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td>
                  <td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td>
                </tr>';
    }
    $data .= '
    </table>
				</fieldset>	
  					
						';
    if (!empty($res[phone])) {
        $data .= GetRecordingsSection($res);
    }
    $data .= '
	  		<button type="button" class="save-dialog" id="save-dialog" style="margin-top:10px;">შენახვა</button>
	  		</div>
			</div>
    </div>';
    return $data;
}
Exemple #30
0
require "../../debug/dBug.php";
$original = "tahi,rua,toru";
$copy = $original;
$reference =& $original;
$original .= ",wha";
$reference .= ",rima";
$copy .= ",ono";
echo "original: {$original}<br>reference: {$reference}<br>copy: {$copy}<br>";
echo "<hr>";
$original = ["red" => "whero", "orange" => "karaka", "yellow" => "kowhai"];
$reference =& $original;
$copy = $original;
$original["green"] = "kakariki";
$original["blue"] = "kikorangi";
$copy["indigo"] = "poropango";
new dBug($original);
new dBug($reference);
new dBug($copy);
echo "<hr>";
$reference = "and now for something completely different";
echo "original: {$original}<br>reference: {$reference}<br>";
new dBug($copy);
echo "<hr>";
function increment(&$x)
{
    $x++;
}
$i = 0;
echo "\$i before: {$i}<br>";
increment($i);
echo "\$i after: {$i}<br>";