HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/posscale/subdomains/ccm/files/home/index_10_2015.php
<h1>Welcome</h1>
<?
	switch($uri[0])
	{		
		case "overall":

			//Used in report_shared
			$pbx = db_query("
				SELECT
				*
				FROM
				pbx
				WHERE
				user_id =".$_SESSION['user']['id'][0]);
			
			?>
		<fieldset style="margin:5px; border:1px dashed #666666;">
		  <legend>Overall Call Centre Report</legend>
		  <form method="post" id="csr" name="csr" >
			<strong>Report For PBX(s):</strong><br />  
			<? 
							for($i=0; $i<$pbx['mysql_num_rows']; $i++) 
							{
								?>
					<label><input type="checkbox" name="pbx[]" value="<?=$pbx['id'][$i]?>" checked="checked"><?=$pbx['name'][$i]?></label>
				<?
								
								$ext = db_query("
									SELECT
										*
									FROM
										extensions
									WHERE
										user_id =".$_SESSION['user']['id'][0]." 
									AND 
										pbx_id =".$pbx['id'][$i]);
								?>
					<div style="margin-left:15px;">
					 <?
											for($t=0; $t<$ext['mysql_num_rows']; $t++) 
											{
												?>
													<label style="white-space: nowrap;"><input type="checkbox" name="ext[]" value="<?=$pbx['id'][$i]?>_<?=$ext['ext'][$t]?>" checked="checked"><?=$ext['ext'][$t]?> (<?=$ext['name'][$t]?>)</label>
												<?
											}
										?>
				  </div>
				<?
							}
						?>
			<br />
			<strong>Select Report Date &amp; Time Period:</strong> <br />  
			Start: <?=f_date('report_from', date('Y-m-d H:i:s', strtotime("Today")))?> 
			Finish: <?=f_date('report_to', date('Y-m-d H:i:s', strtotime("Tomorrow")))?>
			<input type="hidden" name="action" value="overall_report" />
			<input type="hidden" id="csv_hidden" name="csv_hidden" value="" />
			<input type="button" id="go" value="GO" />
			<input type="button" id="csv" value="CSV" />
		  </form>
		</fieldset>
		<div id="results"></div>
							<script type="text/javascript">
							$('go').observe('click',function(event){
								$('csv_hidden').value = '';
								post('<?=$base_url?>/cdr/', $('csr').serialize(), 'results', 0);
							});
							$('csv').observe('click',function(event){
								$('csv_hidden').value = 'CSV';
								$('csr').submit();
							});
							</script>
	  <?
		break;

	}
?>