Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?
function ListViewAjax($where,$table,$module)
{
require_once("modules/".$module."/row_template.php");
if($where)$z="SELECT ".$table.".*,users.user_name as assigned_user_name FROM ".$table." LEFT JOIN users ON (".$table.".assigned_user_id=users.id) WHERE ".$where." and ".$table.".deleted='0'";
else $z="SELECT ".$table.".*,users.user_name as assigned_user_name FROM ".$table." LEFT JOIN users ON (".$table.".assigned_user_id=users.id) WHERE ".$table.".deleted='0'";
if($_REQUEST['order_by'])$z.=" ORDER BY ".$_REQUEST['order_by'];
if($_REQUEST['sorder'])$z.=" ".$_REQUEST['sorder'];
$w=mysql_query($z);
$num=mysql_num_rows($w);
$html=$z.'
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
<tr>
<td COLSPAN="20" align="right">
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" class="listViewPaginationTdS1"><a id=\'export_link\' onclick=\'return export_overlib();\' href="#" class="listViewPaginationLinkS1"><img src=\'themes/Sugar/images/export.gif\' width=\'10\' height=\'9\' alt=\'Export\' border=\'0\' align=\'absmiddle\'>&nbsp;Export</a>&nbsp;&nbsp;|&nbsp;Selected: <input class=\'listViewPaginationTdS1\' style=\'border: 0px; background: transparent; font-size: inherit; color: inherit\' type=\'text\' readonly name=\'selectCount[]\' value=\'0\' /></td>
<td nowrap align="right" class="listViewPaginationTdS1" id=\'listViewPaginationButtons\'><img src=\'themes/Sugar/images/start_off.gif\' width=\'13\' height=\'11\' alt=\'Start\' border=\'0\' align=\'absmiddle\'>&nbsp;Start&nbsp;&nbsp;<img src=\'themes/Sugar/images/previous_off.gif\' width=\'8\' height=\'11\' alt=\'Previous\' border=\'0\' align=\'absmiddle\'>&nbsp;Previous&nbsp;&nbsp;<span class=\'pageNumbers\'>(1 - 7 of 7)</span>&nbsp;&nbsp;Next&nbsp;<img src=\'themes/Sugar/images/next_off.gif\' width=\'8\' height=\'11\' alt=\'Next\' border=\'0\' align=\'absmiddle\'>&nbsp;&nbsp;End&nbsp;<img src=\'themes/Sugar/images/end_off.gif\' width=\'13\' height=\'11\' alt=\'End\' border=\'0\' align=\'absmiddle\'></td></tr></table>
</td>
</tr>';
$html.=HeaderTemplate();
while($r=mysql_fetch_array($w))
{
$html.=RowTemplate($r);
}
$html.="</table>";
return $html;
}
require_once("../../config.php");
$sql=mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']);
mysql_select_db($sugar_config['dbconfig']['db_name']);
mysql_query("set names utf8");
mysql_query("set charaecter set utf8");
echo ListViewAjax($_REQUEST['where'],$_REQUEST['table'],$_REQUEST['module']);
mysql_close($sql);
?>