463 lines
23 KiB
PHP
463 lines
23 KiB
PHP
|
|
<?
|
||
|
|
function search_ids($id,$html="")
|
||
|
|
{
|
||
|
|
$z="select id from ecmdocuments where iddir='".$id."' and deleted='0'";
|
||
|
|
$w=mysql_query($z);
|
||
|
|
while($r=mysql_fetch_array($w))
|
||
|
|
{
|
||
|
|
$html.=$r['id']."||";
|
||
|
|
$html=search_ids($r['id'],$html);
|
||
|
|
}
|
||
|
|
return $html;
|
||
|
|
}
|
||
|
|
$record=$_REQUEST['record'];
|
||
|
|
$ids=search_ids($record,"").$record;
|
||
|
|
$idy=explode("||",$ids);
|
||
|
|
|
||
|
|
////////////////////////Contracts/////////////////////////
|
||
|
|
if($_GET['tab']=="Contracts" or $_GET['tab']=="All")
|
||
|
|
{
|
||
|
|
foreach($idy as $idx)
|
||
|
|
{
|
||
|
|
$z="select contract_id from ecmdocuments_contracts where ecmdocument_id='".$idx."' and deleted='0'";
|
||
|
|
$w=mysql_query($z);
|
||
|
|
while($r=mysql_fetch_array($w))
|
||
|
|
{
|
||
|
|
if($_GET['tab']=="Contracts")
|
||
|
|
{
|
||
|
|
if(mysql_num_rows(mysql_query("select id from contracts where id='".$r['contract_id']."' and name like '%".$_POST['name']."%' and kntr_description like '%".$_POST['kntr_description']."%' and group_name like '%".$_POST['group_name']."%' and contractant_name like '%".$_POST['contractant_name']."%' and signedon like '%".$_POST['signedon']."%' and deleted='0'"))>0)$contracts[]=$r['contract_id'];
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
if(mysql_num_rows(mysql_query("select id from contracts where id='".$r['contract_id']."' and name like '%".$_POST['name']."%' and kntr_description like '%".$_POST['description']."%' and deleted='0'"))>0)$contracts[]=$r['contract_id'];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
$contractsw="";
|
||
|
|
$i=0;
|
||
|
|
if(count($contracts)>0)
|
||
|
|
{
|
||
|
|
foreach($contracts as $contract)
|
||
|
|
{
|
||
|
|
if($i==0)$or="";
|
||
|
|
else $or=" or";
|
||
|
|
$contractsw.=$or." id='".$contract."'";
|
||
|
|
$i++;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
////////////////////////Correspondences/////////////////////////
|
||
|
|
if($_GET['tab']=="Correspondences" or $_GET['tab']=="All")
|
||
|
|
{
|
||
|
|
foreach($idy as $idx)
|
||
|
|
{
|
||
|
|
$z="select correspondence_id from ecmdocuments_correspondences where ecmdocument_id='".$idx."' and deleted='0'";
|
||
|
|
$w=mysql_query($z);
|
||
|
|
while($r=mysql_fetch_array($w))
|
||
|
|
{
|
||
|
|
if($_GET['tab']=="Correspondences")
|
||
|
|
{
|
||
|
|
if(mysql_num_rows(mysql_query("select id from correspondences where id='".$r['correspondence_id']."' and name like '%".$_POST['name']."%' and account_name_from like '%".$_POST['account_name_from']."%' and account_name_to like '%".$_POST['account_name_to']."%' and krsp_description like '%".$_POST['krsp_description']."%' and document_date like '%".$_POST['document_date']."%' and delivery_date like '%".$_POST['delivery_date']."%' and stamp_date like '%".$_POST['stamp_date']."%' and reg_date like '%".$_POST['reg_date']."%' and deleted='0'"))>0)$correspondences[]=$r['correspondence_id'];
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
if(mysql_num_rows(mysql_query("select id from correspondences where id='".$r['correspondence_id']."' and name like '%".$_POST['name']."%' and krsp_description like '%".$_POST['description']."%' and deleted='0'"))>0)$correspondences[]=$r['correspondence_id'];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
$correspondencesw="";
|
||
|
|
$i=0;
|
||
|
|
if(count($correspondences)>0)
|
||
|
|
{
|
||
|
|
foreach($correspondences as $correspondence)
|
||
|
|
{
|
||
|
|
if($i==0)$or="";
|
||
|
|
else $or=" or";
|
||
|
|
$correspondencesw.=$or." id='".$correspondence."'";
|
||
|
|
$i++;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
////////////////////////EcmInvoices/////////////////////////
|
||
|
|
if($_GET['tab']=="EcmInvoices" or $_GET['tab']=="All")
|
||
|
|
{
|
||
|
|
foreach($idy as $idx)
|
||
|
|
{
|
||
|
|
$z="select ecminvoice_id from ecmdocuments_ecminvoices where ecmdocument_id='".$idx."' and deleted='0'";
|
||
|
|
$w=mysql_query($z);
|
||
|
|
while($r=mysql_fetch_array($w))
|
||
|
|
{
|
||
|
|
if($_GET['tab']=="EcmInvoices")
|
||
|
|
{
|
||
|
|
if(mysql_num_rows(mysql_query("select id from ecminvoices where id='".$r['ecminvoice_id']."' and name like '%".$_POST['name']."%' and description like '%".$_POST['ekmn_description']."%' and filename like '%".$_POST['ekmn_filename']."%' and from_name like '%".$_POST['from_name']."%' and to_name like '%".$_POST['to_name']."%' and deleted='0'"))>0)$ecminvoices[]=$r['ecminvoice_id'];
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
if(mysql_num_rows(mysql_query("select id from ecminvoices where id='".$r['ecminvoice_id']."' and name like '%".$_POST['name']."%' and description like '%".$_POST['description']."%' and deleted='0'"))>0)$ecminvoices[]=$r['ecminvoice_id'];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
$ecminvoicesw="";
|
||
|
|
$i=0;
|
||
|
|
if(count($ecminvoices)>0)
|
||
|
|
{
|
||
|
|
foreach($ecminvoices as $ecminvoice)
|
||
|
|
{
|
||
|
|
if($i==0)$or="";
|
||
|
|
else $or=" or";
|
||
|
|
$ecminvoicesw.=$or." id='".$ecminvoice."'";
|
||
|
|
$i++;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
////////////////////////Contracts/////////////////////////
|
||
|
|
if($_GET['tab']=="EcmFiles" or $_GET['tab']=="All")
|
||
|
|
{
|
||
|
|
foreach($idy as $idx)
|
||
|
|
{
|
||
|
|
$z="select ecmfile_id from ecmdocuments_ecmfiles where ecmdocument_id='".$idx."' and deleted='0'";
|
||
|
|
$w=mysql_query($z);
|
||
|
|
while($r=mysql_fetch_array($w))
|
||
|
|
{
|
||
|
|
if($_GET['tab']=="EcmFiles")
|
||
|
|
{
|
||
|
|
if(mysql_num_rows(mysql_query("select id from ecmfiles where id='".$r['ecmfile_id']."' and name like '%".$_POST['name']."%' and description like '%".$_POST['description']."%' and deleted='0'"))>0)$ecmfiles[]=$r['ecmfile_id'];
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
if(mysql_num_rows(mysql_query("select id from ecmfiles where id='".$r['ecmfile_id']."' and name like '%".$_POST['name']."%' and description like '%".$_POST['description']."%' and deleted='0'"))>0)$ecmfiles[]=$r['ecmfile_id'];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
$ecmfilesw="";
|
||
|
|
$i=0;
|
||
|
|
if(count($ecmfiles)>0)
|
||
|
|
{
|
||
|
|
foreach($ecmfiles as $ecmfile)
|
||
|
|
{
|
||
|
|
if($i==0)$or="";
|
||
|
|
else $or=" or";
|
||
|
|
$ecmfilesw.=$or." id='".$ecmfile."'";
|
||
|
|
$i++;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
?>
|
||
|
|
<form id="form1" name="form1" method="post" action="index.php?module=EcmDocuments&action=SearchProjects&record=<?print $_REQUEST['record'];?>&tab=<?print $_REQUEST['tab'];?>">
|
||
|
|
<ul class="tablist">
|
||
|
|
<li <?if($_GET['tab']=="All")print 'class="active"';?>><a <?if($_GET['tab']=="All")print 'class="current"';?> href="index.php?module=EcmDocuments&action=SearchProjects&record=<?print $_GET['record'];?>&tab=All">All</a></li>
|
||
|
|
<li <?if($_GET['tab']=="Contracts")print 'class="active"';?>><a <?if($_GET['tab']=="Contracts")print 'class="current"';?> href="index.php?module=EcmDocuments&action=SearchProjects&record=<?print $_GET['record'];?>&tab=Contracts">Contracts</a></li>
|
||
|
|
<li <?if($_GET['tab']=="Correspondences")print 'class="active"';?>><a <?if($_GET['tab']=="Correspondences")print 'class="current"';?> href="index.php?module=EcmDocuments&action=SearchProjects&record=<?print $_GET['record'];?>&tab=Correspondences">Correspondences</a></li>
|
||
|
|
<li <?if($_GET['tab']=="EcmInvoices")print 'class="active"';?>><a <?if($_GET['tab']=="EcmInvoices")print 'class="current"';?> href="index.php?module=EcmDocuments&action=SearchProjects&record=<?print $_GET['record'];?>&tab=EcmInvoices">EcmInvoices</a></li>
|
||
|
|
<li <?if($_GET['tab']=="EcmFiles")print 'class="active"';?>><a <?if($_GET['tab']=="EcmFiles")print 'class="current"';?> href="index.php?module=EcmDocuments&action=SearchProjects&record=<?print $_GET['record'];?>&tab=EcmFiles">EcmFiles</a></li>
|
||
|
|
</ul>
|
||
|
|
<?
|
||
|
|
if($_GET['tab']=="All")
|
||
|
|
{
|
||
|
|
print '
|
||
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top: 0px none; margin-bottom: 4px" class="tabForm">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||
|
|
<tr>
|
||
|
|
<td width="20%" valign="top" class="dataLabel"><span sugar="slot1">Name</span sugar="slot"></td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><span sugar="slot1b"><input name="name" type="text" tabindex="1" size="30" maxlength="50"></span sugar="slot"></td>
|
||
|
|
<td width="20%" valign="top" class="dataLabel"><span sugar="slot`3`">Description</span sugar="slot"></td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><span sugar="slot`3`b">
|
||
|
|
<textarea name="description" cols="25" rows="4" id="description" tabindex="`3`" title="Description"></textarea>
|
||
|
|
</span sugar="slot"></td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>';
|
||
|
|
}
|
||
|
|
if($_GET['tab']=="Contracts")
|
||
|
|
{
|
||
|
|
print '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top: 0px none; margin-bottom: 4px" class="tabForm">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||
|
|
<tr>
|
||
|
|
<td width="20%" valign="top" class="dataLabel"><span sugar="slot1"></span sugar="slot">Name</td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><span sugar="slot1b"><input name="name" type="text" tabindex="1" size="30" maxlength="50" value=""></span sugar="slot"></td>
|
||
|
|
<td width="20%" valign="top" class="dataLabel">Signed On</td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><input name="signedon" id="signedon_field" onBlur="SugarWidgetScheduler.update_time();" tabindex="1" size="10" maxlength="11" type="text" value="">
|
||
|
|
<slot><img src="themes/Sugar/images/jscalendar.gif" alt="Enter Date" id="signedon_trigger" align="absmiddle"/> <span class="dateFormat">(yyyy-mm-dd)</span></slot>
|
||
|
|
<script type="text/javascript">
|
||
|
|
Calendar.setup ({
|
||
|
|
inputField : "signedon_field", ifFormat : "%Y-%m-%d", showsTime : false, button : "signedon_trigger", singleClick : true, step : 1
|
||
|
|
});
|
||
|
|
</script></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td rowspan="3" valign="top" class="dataLabel">Description</td>
|
||
|
|
<td width="30%" rowspan="2" valign="top" class="dataField"><span sugar="slot`3b">
|
||
|
|
<textarea name="kntr_description" title="Description" tabindex="`3`" cols="25" rows="4"></textarea>
|
||
|
|
</span sugar="slot"></td>
|
||
|
|
<td class="dataLabel" valign="top">Celtic Group</td>
|
||
|
|
<td class="dataField"><input name="group_name" type="text" id="group_name" tabindex="1" value="" size="25" maxlength="50" /></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td valign="top" class="dataLabel">Contractant</td>
|
||
|
|
<td class="dataField"><input name="contractant_name" type="text" id="contractant_name" tabindex="1" value="" size="25" maxlength="50" /></td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
';
|
||
|
|
}
|
||
|
|
if($_GET['tab']=="Correspondences")
|
||
|
|
{
|
||
|
|
print '
|
||
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top: 0px none; margin-bottom: 4px" class="tabForm">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||
|
|
<tr>
|
||
|
|
<td width="20%" valign="top" class="dataLabel"><span sugar="slot1">Name</span sugar="slot"></td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><span sugar="slot1b"><input name="name" type="text" tabindex="1" size="30" maxlength="50"></span sugar="slot"></td>
|
||
|
|
<td width="20%" valign="top" class="dataLabel">Reg Date </td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><input name="reg_date" id="reg_date_field" onBlur="SugarWidgetScheduler.update_time();" tabindex="1" size="10" maxlength="11" type="text" />
|
||
|
|
<img src="themes/Sugar/images/jscalendar.gif" alt="Enter Date" id="reg_date_trigger" align="absmiddle"/> <span class="dateFormat">(yyyy-mm-dd)</span>
|
||
|
|
<script type="text/javascript">
|
||
|
|
Calendar.setup ({
|
||
|
|
inputField : "reg_date_field", ifFormat : "%Y-%m-%d", showsTime : false, button : "reg_date_trigger", singleClick : true, step : 1
|
||
|
|
});
|
||
|
|
</script></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td valign="top"><span class="dataLabel">Account Name From </span></td><td valign="top"><span class="dataField">
|
||
|
|
<input name="account_name_from" type="text" id="account_name_from" tabindex="1" size="25" maxlength="50" />
|
||
|
|
</span></td>
|
||
|
|
<td class="dataLabel" valign="top">Account Name To </td>
|
||
|
|
<td class="dataField"><input name="account_name_to" type="text" id="account_name_to" tabindex="1" size="25" maxlength="50" /></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td valign="top"><span class="dataLabel">Document Date </span></td>
|
||
|
|
<td valign="top"><input name="document_date" id="document_date_field" onblur="SugarWidgetScheduler.update_time();" tabindex="11" size="10" maxlength="11" type="text" />
|
||
|
|
<img src="themes/Sugar/images/jscalendar.gif" alt="Enter Date" id="document_date_trigger" align="absmiddle"/> <span class="dateFormat">(yyyy-mm-dd)</span>
|
||
|
|
<script type="text/javascript">
|
||
|
|
Calendar.setup ({
|
||
|
|
inputField : "document_date_field", ifFormat : "%Y-%m-%d", showsTime : false, button : "document_date_trigger", singleClick : true, step : 1
|
||
|
|
});
|
||
|
|
</script></td>
|
||
|
|
<td rowspan="3" valign="top" class="dataLabel"><span sugar="slot`3`">Description</span sugar="slot"></td>
|
||
|
|
<td rowspan="3" valign="top" class="dataField"><span sugar="slot`3`b">
|
||
|
|
<textarea name="krsp_description" title="Description" tabindex="3" cols="25" rows="4"></textarea>
|
||
|
|
</span sugar="slot"></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td valign="top"><span class="dataLabel">Stamp Date </span></td>
|
||
|
|
<td valign="top"><input name="stamp_date" id="stamp_date_field" onblur="SugarWidgetScheduler.update_time();" tabindex="11" size="10" maxlength="11" type="text" />
|
||
|
|
<img src="themes/Sugar/images/jscalendar.gif" alt="Enter Date" id="stamp_date_trigger" align="absmiddle"/> <span class="dateFormat">(yyyy-mm-dd)</span>
|
||
|
|
<script type="text/javascript">
|
||
|
|
Calendar.setup ({
|
||
|
|
inputField : "stamp_date_field", ifFormat : "%Y-%m-%d", showsTime : false, button : "stamp_date_trigger", singleClick : true, step : 1
|
||
|
|
});
|
||
|
|
</script></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td valign="top"><span class="dataLabel">Delivery Date </span></td>
|
||
|
|
<td valign="top"><input name="delivery_date" id="delivery_date_field" onblur="SugarWidgetScheduler.update_time();" tabindex="11" size="10" maxlength="11" type="text" />
|
||
|
|
<img src="themes/Sugar/images/jscalendar.gif" alt="Enter Date" id="delivery_date_trigger" align="absmiddle"/> <span class="dateFormat">(yyyy-mm-dd)</span>
|
||
|
|
<script type="text/javascript">
|
||
|
|
Calendar.setup ({
|
||
|
|
inputField : "delivery_date_field", ifFormat : "%Y-%m-%d", showsTime : false, button : "delivery_date_trigger", singleClick : true, step : 1
|
||
|
|
});
|
||
|
|
</script></td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>';
|
||
|
|
}
|
||
|
|
if($_GET['tab']=="EcmInvoices")
|
||
|
|
{
|
||
|
|
print '
|
||
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top: 0px none; margin-bottom: 4px" class="tabForm">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||
|
|
<tr>
|
||
|
|
<td width="20%" valign="top" class="dataLabel"><span sugar="slot1">Name</span sugar="slot"></td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><span sugar="slot1b"><input name="name" type="text" tabindex="1" size="30" maxlength="50"></span sugar="slot"></td>
|
||
|
|
<td width="20%" valign="top" class="dataLabel">Filename</td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><span sugar="slot1b">
|
||
|
|
<input name="ekmn_filename" title="Filename" type="text" tabindex="1" maxlength="255">
|
||
|
|
</span sugar="slot"></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td rowspan="3" valign="top"><span class="dataLabel"><span sugar="slot`3`">Description</span sugar="slot"></span></td><td rowspan="3" valign="top"><span class="dataField"><span sugar="slot`3`b">
|
||
|
|
<textarea name="ekmn_description" title="Description" tabindex="`3`" cols="25" rows="4"></textarea>
|
||
|
|
</span sugar="slot"></span></td>
|
||
|
|
|
||
|
|
<td valign="top" class="dataLabel">From</td>
|
||
|
|
<td valign="top" class="dataField"><input name="from_name" type="text" id="from_name" tabindex="1" title="Filename" maxlength="255" /></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td valign="top" class="dataLabel">To</td>
|
||
|
|
<td valign="top" class="dataField"><input name="to_name" type="text" id="to_name" tabindex="1" title="Filename" maxlength="255" /></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td valign="top" class="dataLabel"> </td>
|
||
|
|
<td valign="top" class="dataField"> </td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>';
|
||
|
|
}
|
||
|
|
|
||
|
|
if($_GET['tab']=="EcmFiles")
|
||
|
|
{
|
||
|
|
print '
|
||
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top: 0px none; margin-bottom: 4px" class="tabForm">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||
|
|
<tr>
|
||
|
|
<td width="20%" valign="top" class="dataLabel"><span sugar="slot1">Name</span sugar="slot"></td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><span sugar="slot1b"><input name="name" type="text" tabindex="1" size="30" maxlength="50"></span sugar="slot"></td>
|
||
|
|
<td width="20%" valign="top" class="dataLabel"><span sugar="slot`3`">Description</span sugar="slot"></td>
|
||
|
|
<td width="30%" valign="top" class="dataField"><span sugar="slot`3`b">
|
||
|
|
<textarea name="description" cols="25" rows="4" id="description" tabindex="`3`" title="Description"></textarea>
|
||
|
|
</span sugar="slot"></td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>';
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
<input type="submit" name="search" value="Search" class="button">
|
||
|
|
</form>
|
||
|
|
<?
|
||
|
|
////////////////////////Contracts/////////////////////////
|
||
|
|
if($_GET['tab']=="Contracts" or $_GET['tab']=="All")
|
||
|
|
{
|
||
|
|
print '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div></p><p><table width="100%" cellpadding="0" cellspacing="0" border="0" class="h3Row"><tr><td nowrap><h3>Contracts List</h3></td><td width="100%"><IMG height="1" width="1" src="include/images/blank.gif" alt=""></td></tr></table><table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
|
||
|
|
<tr height="20">
|
||
|
|
<td scope="col" width="40%" class="listViewThS1" NOWRAP>Name</td>
|
||
|
|
<td scope="col" width="20%" class="listViewThS1" NOWRAP>Celtic Group</td>
|
||
|
|
<td scope="col" width="23%" class="listViewThS1" NOWRAP>Contractant</td>
|
||
|
|
<td scope="col" width="20%" class="listViewThS1" NOWRAP>Signed On</td>
|
||
|
|
</tr>';
|
||
|
|
if(!$contractsw)$contractsw="id='xxx'";
|
||
|
|
$z="select distinct * from contracts where ".$contractsw." order by name";
|
||
|
|
$w=mysql_query($z);
|
||
|
|
while($r=mysql_fetch_array($w))
|
||
|
|
{
|
||
|
|
print '
|
||
|
|
<tr height="20">
|
||
|
|
|
||
|
|
<td scope="row" valign=TOP class="oddListRowS1" bgcolor="#ffffff">
|
||
|
|
<slot><a href="index.php?action=DetailView&module=Contracts&record='.$r['id'].'" class="listViewTdLinkS1">'.$r['name'].'</a></slot> </td>
|
||
|
|
|
||
|
|
<td valign=TOP class="oddListRowS1" bgcolor="#ffffff" nowrap><a href="index.php?action=DetailView&module=Accounts&record='.$r['group_id'].'" class="listViewTdLinkS1">'.$r['group_name'].'</a></td>
|
||
|
|
<td valign=TOP class="oddListRowS1" bgcolor="#ffffff" nowrap><a href="index.php?action=DetailView&module=Accounts&record='.$r['contractant_id'].'" class="listViewTdLinkS1">'.$r['contractant_name'].'</a></td>
|
||
|
|
<td valign=TOP class="oddListRowS1" bgcolor="#ffffff" nowrap>'.$r['signedon'].'</td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
<tr><td colspan="27" class="listViewHRS1"></td></tr>
|
||
|
|
';
|
||
|
|
}
|
||
|
|
print '</table>';
|
||
|
|
}
|
||
|
|
////////////////////////Correspondences/////////////////////////
|
||
|
|
if($_GET['tab']=="Correspondences" or $_GET['tab']=="All")
|
||
|
|
{
|
||
|
|
print '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div></p><p><table width="100%" cellpadding="0" cellspacing="0" border="0" class="h3Row"><tr><td nowrap><h3>Correspondence List</h3></td><td width="100%"><IMG height="1" width="1" src="include/images/blank.gif" alt=""></td></tr></table><table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
|
||
|
|
<tr height="20">
|
||
|
|
<td scope="col" width="40%" class="listViewThS1" NOWRAP>Name</td>
|
||
|
|
<td scope="col" width="20%" class="listViewThS1" NOWRAP>From</td>
|
||
|
|
<td scope="col" width="20%" class="listViewThS1" NOWRAP>To</td>
|
||
|
|
<td scope="col" width="20%" class="listViewThS1" NOWRAP>Register Date</td>
|
||
|
|
</tr>';
|
||
|
|
if(!$correspondencesw)$correspondencesw="id='xxx'";
|
||
|
|
$z="select distinct * from correspondences where ".$correspondencesw." order by name";
|
||
|
|
$w=mysql_query($z);
|
||
|
|
while($r=mysql_fetch_array($w))
|
||
|
|
{
|
||
|
|
print '
|
||
|
|
<tr height="20">
|
||
|
|
|
||
|
|
<td scope="row" valign=TOP class="oddListRowS1" bgcolor="#ffffff">
|
||
|
|
<slot><a href="index.php?action=DetailView&module=Correspondences&record='.$r['id'].'" class="listViewTdLinkS1">'.$r['name'].'</a></slot> </td>
|
||
|
|
|
||
|
|
<td valign=TOP class="oddListRowS1" bgcolor="#ffffff" nowrap><a href="index.php?action=DetailView&module=Accounts&record='.$r['account_from'].'" class="listViewTdLinkS1">'.$r['account_name_from'].'</a></td>
|
||
|
|
<td valign=TOP class="oddListRowS1" bgcolor="#ffffff" nowrap><a href="index.php?action=DetailView&module=Accounts&record='.$r['account_to'].'" class="listViewTdLinkS1">'.$r['account_name_to'].'</a></td>
|
||
|
|
<td valign=TOP class="oddListRowS1" bgcolor="#ffffff" nowrap>'.$r['reg_date'].'</td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
<tr><td colspan="27" class="listViewHRS1"></td></tr>
|
||
|
|
';
|
||
|
|
}
|
||
|
|
print '</table>';
|
||
|
|
}
|
||
|
|
////////////////////////EcmInvoices/////////////////////////
|
||
|
|
if($_GET['tab']=="EcmInvoices" or $_GET['tab']=="All")
|
||
|
|
{
|
||
|
|
print '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div></p><p><table width="100%" cellpadding="0" cellspacing="0" border="0" class="h3Row"><tr><td nowrap><h3>EcmInvoices List</h3></td><td width="100%"><IMG height="1" width="1" src="include/images/blank.gif" alt=""></td></tr></table>
|
||
|
|
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
|
||
|
|
<tr height="20">
|
||
|
|
<td scope="col" width="40%" class="listViewThS1" NOWRAP>Name</td>
|
||
|
|
<td scope="col" width="20%" class="listViewThS1" NOWRAP>From</td>
|
||
|
|
<td scope="col" width="20%" class="listViewThS1" NOWRAP>To</td>
|
||
|
|
<td scope="col" width="20%" class="listViewThS1" NOWRAP>Type</td>
|
||
|
|
</tr>';
|
||
|
|
if(!$ecminvoicesw)$ecminvoicesw="id='xxx'";
|
||
|
|
$z="select distinct * from ecminvoices where ".$ecminvoicesw." order by name";
|
||
|
|
$w=mysql_query($z);
|
||
|
|
while($r=mysql_fetch_array($w))
|
||
|
|
{
|
||
|
|
print '
|
||
|
|
<!-- BEGIN: row -->
|
||
|
|
<tr height="20">
|
||
|
|
|
||
|
|
<td scope="row" valign=TOP class="oddListRowS1" bgcolor="#ffffff">
|
||
|
|
<slot><a href="index.php?action=DetailView&module=EcmInvoices&record='.$r['id'].'" class="listViewTdLinkS1">'.$r['name'].'</a></slot> </td>
|
||
|
|
|
||
|
|
<td valign=TOP class="oddListRowS1" bgcolor="#ffffff" nowrap><a href="index.php?action=DetailView&module=Accounts&record='.$r['from_id'].'" class="listViewTdLinkS1">'.$r['from_name'].'</a></td>
|
||
|
|
<td valign=TOP class="oddListRowS1" bgcolor="#ffffff" nowrap><a href="index.php?action=DetailView&module=Accounts&record='.$r['to_id'].'" class="listViewTdLinkS1">'.$r['to_name'].'</a></td>
|
||
|
|
<td valign=TOP class="oddListRowS1" bgcolor="#ffffff" nowrap>'.$r['invoice_type'].'</td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
<tr><td colspan="27" class="listViewHRS1"></td></tr>
|
||
|
|
';
|
||
|
|
}
|
||
|
|
print '</table>';
|
||
|
|
}
|
||
|
|
////////////////////////EcmFiles/////////////////////////
|
||
|
|
if($_GET['tab']=="EcmFiles" or $_GET['tab']=="All")
|
||
|
|
{
|
||
|
|
print '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div></p><p><table width="100%" cellpadding="0" cellspacing="0" border="0" class="h3Row"><tr><td nowrap><h3>EcmFiles List</h3></td><td width="100%"><IMG height="1" width="1" src="include/images/blank.gif" alt=""></td></tr></table>
|
||
|
|
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
|
||
|
|
<tr height="20">
|
||
|
|
<td scope="col" width="40%" class="listViewThS1" NOWRAP>Name</td>
|
||
|
|
</tr>';
|
||
|
|
if(!$ecmfilesw)$ecmfilesw="id='xxx'";
|
||
|
|
$z="select distinct * from ecmfiles where ".$ecmfilesw." order by name";
|
||
|
|
$w=mysql_query($z);
|
||
|
|
while($r=mysql_fetch_array($w))
|
||
|
|
{
|
||
|
|
print '
|
||
|
|
<!-- BEGIN: row -->
|
||
|
|
<tr height="20">
|
||
|
|
|
||
|
|
<td scope="row" valign=TOP class="oddListRowS1" bgcolor="#ffffff">
|
||
|
|
<slot><a href="index.php?action=DetailView&module=EcmFiles&record='.$r['id'].'" class="listViewTdLinkS1">'.$r['name'].'</a></slot> </td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
<tr><td colspan="27" class="listViewHRS1"></td></tr>
|
||
|
|
';
|
||
|
|
}
|
||
|
|
print '</table>';
|
||
|
|
}
|
||
|
|
?>
|