Ejemplo n.ยบ 1
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="">แƒ—แƒแƒ แƒ˜แƒฆแƒ˜</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;
}
Ejemplo n.ยบ 2
0
            if ($inc_task_ch['id'] == '' and $task_type_id > 0) {
                AddTask($id_p, $task_type_id, $task_department_id, $c_date, $done_start_time, $done_end_time, $comment, $persons_id, $priority_id);
            } else {
                $user = $_SESSION['USERID'];
                $r_user = realuser($persons_id);
                mysql_query("UPDATE `task` SET  `user_id`='{$user}',\n                                    `responsible_user_id`='{$r_user}',\n                                    `start_date`='{$done_start_time}',\n                                    `end_date`='{$done_end_time}',\n                                    `department_id`='{$task_department_id}',\n                                    `task_type_id`='{$task_type_id}',\n                                    `priority_id`='{$priority_id}',\n                                    `comment`='{$comment}'\n                              WHERE `incomming_call_id`='{$id_p}'");
            }
            Saveincomming($id_h, $phone, $person_name, $type_id, $call_type_id, $product_type_id, $card_id, $department_id, $information_category_id, $information_sub_category_id, $production_category_id, $genre_id, $production_id, $content, $sum_pirce, $shipping_id, $module_id, $call_comment, $call_status_id, $task_department_id, $source_id, $c_date, $persons_id, $priority_id, $done_start_time, $done_end_time, $comment, $task_type_id, $status_2, $status_1);
        }
        break;
    case 'get_calls':
        $data = array('calls' => getCalls());
        break;
    case 'category_change':
        $information_category_id_check = $_REQUEST['information_category_id_check'];
        $data = array('cat' => Getinformation_sub_category('', $information_category_id_check));
        break;
    case 'set_task_type':
        $cat_id = $_REQUEST['cat_id'];
        $data = array('cat' => Getbank_object($cat_id));
        break;
    case 'delete_file':
        mysql_query("DELETE FROM file WHERE id = {$delete_id}");
        $increm = mysql_query("\tSELECT  `name`,\n\t\t\t\t\t`rand_name`,\n\t\t\t\t\t`id`\n\t\t\t\t\tFROM \t`file`\n\t\t\t\t\tWHERE   `incomming_call_id` = {$edit_id}\n\t\t\t\t\t");
        $data1 = '';
        while ($increm_row = mysql_fetch_assoc($increm)) {
            $data1 .= '<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>';
Ejemplo n.ยบ 3
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;
}