Example #1
0
			$today_date = date ("Y/m/d");
			$expire_date = date ("Y/m/d", strtotime ("now") + $search_expire_days * 86400);
			$where_clause .= sprintf (' AND (date_end < "%s" AND date_end > "%s")', $expire_date, $today_date);
		}
		
		echo '<form action="index.php?sec=customers&sec2=operation/contracts/contract_detail" method="post">';
		
		echo "<table width=99% class='search-table'>";
		echo "<tr>";
		
		echo "<td colspan=2>";
		echo print_input_text ("search_text", $search_text, "", 38, 100, true, __('Search'));
		echo "</td>";
		
		echo "<td>";
		echo print_select (get_company_roles(), 'search_company_role',
			$search_company_role, '', __('All'), 0, true, false, false, __('Company roles'));	
		echo "</td>";
		
		echo "<td>";
		echo print_select (get_contract_status(), 'search_status',
			$search_status, '', __('Any'), -1, true, false, false, __('Status'));	
		echo "</td>";
		
		echo "<td>";
		echo print_select (get_contract_expire_days(), 'search_expire_days',
			$search_expire_days, '', __('None'), 0, true, false, false, __('Out of date'));	
		echo "</td>";
		
		echo "</tr>";
		
Example #2
0
     $where_clause .= sprintf(' AND status = %d', $search_status);
 }
 if ($search_expire_days > 0) {
     // Comment $today_date to show contracts that expired yet
     $today_date = date("Y/m/d");
     $expire_date = date("Y/m/d", strtotime("now") + $search_expire_days * 86400);
     $where_clause .= sprintf(' AND (date_end < "%s" AND date_end > "%s")', $expire_date, $today_date);
 }
 echo '<form action="index.php?sec=customers&sec2=operation/contracts/contract_detail" method="post">';
 echo "<table width=99% class='search-table'>";
 echo "<tr>";
 echo "<td colspan=2>";
 echo print_input_text("search_text", $search_text, "", 38, 100, true, __('Search'));
 echo "</td>";
 echo "<td>";
 echo print_select(get_company_roles(), 'search_company_role', $search_company_role, '', __('All'), 0, true, false, false, __('Company roles'));
 echo "</td>";
 echo "<td>";
 echo print_select(get_contract_status(), 'search_status', $search_status, '', __('Any'), -1, true, false, false, __('Status'));
 echo "</td>";
 echo "<td>";
 echo print_select(get_contract_expire_days(), 'search_expire_days', $search_expire_days, '', __('None'), 0, true, false, false, __('Out of date'));
 echo "</td>";
 echo "</tr>";
 echo "<tr>";
 echo "<td>";
 echo print_input_text('search_date_begin_beginning', $search_date_begin_beginning, '', 15, 20, true, __('Begining From'));
 echo "<a href='#' class='tip'><span>" . __('Date format is YYYY-MM-DD') . "</span></a>";
 echo "</td>";
 echo "<td>";
 echo print_input_text('search_date_end_beginning', $search_date_end_beginning, '', 15, 20, true, __('Begining To'));
Example #3
0
			$today_date = date ("Y/m/d");
			$expire_date = date ("Y/m/d", strtotime ("now") + $search_expire_days * 86400);
			$where_clause .= sprintf (' AND (date_end < "%s" AND date_end > "%s")', $expire_date, $today_date);
		}


		$form = '<form action="index.php?sec=customers&sec2=operation/companies/company_detail&id='.$id.'&op=contracts" method="post">';
		$form .= '<div class="divform">';
		$form .= "<table width=100% class='search-table'>";
		
		$form .= "<tr><td colspan=2>";
		$form .= print_input_text ("search_text", $search_text, "", 38, 100, true, __('Search'));
		$form .= "</td></tr>";
		
		$form .= "<tr><td>";
		$form .= print_select (get_company_roles(), 'search_company_role',
			$search_company_role, '', __('All'), 0, true, false, false, __('Company roles'));	
		$form .= "</td></tr>";
		
		$form .= "<tr><td>";
		$form .= print_select (get_contract_status(), 'search_status',
			$search_status, '', __('Any'), -1, true, false, false, __('Status'));	
		$form .= "</td></tr>";
		
		$form .= "<tr><td>";
		$form .= print_select (get_contract_expire_days(), 'search_expire_days',
			$search_expire_days, '', __('None'), 0, true, false, false, __('Out of date'));	
		$form .= "</td></tr>";

		$form .= "<tr><td>";
		$form .= print_input_text ('search_date_begin_beginning', $search_date_begin_beginning, '', 15, 20, true, __('Begining From') .