Hacked By AnonymousFox
<?
include("../../lib/session.php");
include("../../lib/config.php");
include("../../lib/connect.php");
include("../../lib/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/inner.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>:: Crm ::</title>
<link rel="stylesheet" type="text/css" href="../../css/theme.css" />
<link rel="stylesheet" type="text/css" href="../../css/style.css" />
</head>
<body>
<div id="container">
<div id="header">
<h2 align="left"><img src="../../img/logo_clickthumb.png" width="60" height="54" />Clickbkk CRM</h2>
</div>
<p> </p>
<p align="right">
<strong>Hi ! <?=$System_Session_UserName?> | <a href="../logout.php">logout</a></strong></p>
<div id="wrapper">
<div id="content">
<!-- InstanceBeginEditable name="content" -->
<div id="box">
<h3>�����ŵԴ����١���</h3>
<br />
<script language="JavaScript" src="../lib/popup.js" type="text/javascript"></script>
<?
## Load Module Configuration Variable ############################################
include("config.php");
## Default Value ############################################
$SystemModule_defaultPageSize = 10;
$SystemModule_defaultPageShow = 1;
$SystemModule_MaxPage = 20;
$SystemModule_ReduceRange = 10; // +,- from current page show
$SystemModule_ASCDESC = "DESC";
$myModule_Table = $myModule_Table1;
$SystemModule_OrderBy = $myModule_Table."_ID";
#########################################################
if($myDate=="") { $myDate=getDateNow(); }
if($myTime=="") { $myTime=getTimeNow(); }
?>
<?
####################################################################
if($action=="view") {
$myCheckBoxID=0;
for($i=1;$i<=$TotalCheckBoxID;$i++) {
$myVar="CheckBoxID".$i;
if(strlen($$myVar)>0) {
$myCheckBoxID=$$myVar;
}
}
$sql="SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_ID=".$myCheckBoxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
$HTMLsrcSTR=$Row[$myModule_Table."_HtmlFile"];
$HTMLsrc = $myModule_Path_HTMLFiles."/".$Row[$myModule_Table."_HtmlFile"];
?>
<br />
<table width="98%" border="0" cellpadding="0" cellspacing="1" class="table_header">
<form action="?" method="post" name="myReturnForm" id="myReturnForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" value="" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
</form>
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" value="edit" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
<input name="CheckBoxID1" type="hidden" id="CheckBoxID1" value="<?=$myCheckBoxID?>" />
<input name="TotalCheckBoxID" type="hidden" id="TotalCheckBoxID" value="1" />
<tr>
<td bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td height="24" colspan="2" align="center" class="menu_table_header">View
<?=getMenuName($SystemMenuID)?>
</td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Date
Information</td>
</tr>
<tr>
<td width="17%" height="22" align="right" class="table_col1">Date
From </td>
<td width="83%" height="22" class="table_col2">
<?=ShowDateEn($Row[$myModule_Table."_DateFrom"])?>
</td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Date
To </td>
<td height="22" class="table_col2">
<?=ShowDateEn($Row[$myModule_Table."_DateTo"])?>
</td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Time </td>
<td height="22" class="table_col2">
<? if($Row[$myModule_Table."_TimeTo"]=="00:00:00") { ?>
<?=substr($Row[$myModule_Table."_TimeFrom"],0,5)?>
<? } else { ?>
<?=substr($Row[$myModule_Table."_TimeFrom"],0,5)." - ".substr($Row[$myModule_Table."_TimeTo"],0,5)?>
<? } ?>
</td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Group </td>
<td height="22" class="table_col2">
<?
$GroupID = $Row[$myModule_Table."_GroupID"];
$sql = "SELECT ".$myModule_Table1Group."_Name FROM ".$myModule_Table1Group." WHERE ".$myModule_Table1Group."_ID = '$GroupID'";
$QueryG=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$RowG = MYSQL_FETCH_ARRAY($QueryG);
echo $RowG[0];
?>
</td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Activity
Information </td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Subject </td>
<td height="22" class="table_col2">
<?=$Row[$myModule_Table."_Subject"]?>
</td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Location </td>
<td height="22" class="table_col2"><?=nl2br($Row[$myModule_Table."_Location"])?></td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Url </td>
<td height="22" class="table_col2"><?=$Row[$myModule_Table."_Url"]?></td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Files </td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Document Files </td>
<td height="22" class="table_col2">
<?
$sqlFile = "SELECT * FROM ".$myModule_Table1_FileUpload." WHERE ".$myModule_Table1_FileUpload."_CalID = '".$myCheckBoxID."'";
$QueryFile=MYSQL_DB_QUERY($System_DataBase_Name,$sqlFile) or die(mysql_error());
while ($RowFile=MYSQL_FETCH_ARRAY($QueryFile)){
$LinkRelativePath = $myModule_Path_UploadFiles."/".$RowFile[$myModule_Table1_FileUpload."_FileUpload"];
$DownloadFile = $RowFile[$myModule_Table1_FileUpload."_FileUpload"];
$ImageType = strstr($DownloadFile,'.');
if($ImageType==".pdf"){
$TypeImgFile="../../images/bullet/pdf.gif";
}elseif($ImageType==".txt"){
$TypeImgFile="../../images/bullet/file.gif";
}elseif($ImageType==".xls"){
$TypeImgFile="../../images/bullet/excel.gif";
}elseif($ImageType==".ppt"){
$TypeImgFile="../../images/bullet/pp.gif";
}elseif($ImageType==".rtf"){
$TypeImgFile="../../images/bullet/word.gif";
}elseif($ImageType==".rar"){
$TypeImgFile="../../images/bullet/rar.gif";
}else{
$TypeImgFile="../../images/bullet/application.gif";
}
?><br /><a href="<?=$LinkRelativePath?>" target="_blank"><strong>
<img src="<?=$TypeImgFile?>" border="0" alt="<?=$ImageType?>" /> <?=$RowFile[$myModule_Table1_FileUpload."_FileUploadName"];?>
</strong></a>
<? }?></td>
</tr>
<tr style="display:none; ">
<td height="22" align="right" class="table_col1">Thumbnail Picture</td>
<td height="22" class="table_col2"><span class="table_col1">
<?// if($Row[$myModule_Table."_PictureFile"]){?>
<img src="<?=$myModule_Path_ThumbnailPicture?>/<?=$Row[$myModule_Table."_PictureFile"]?>" border="0" />
<?// }?>
</span></td>
</tr>
<tr style="display:none; ">
<td height="22" align="right" class="table_col1">Picture File name </td>
<td height="22" class="table_col2"><?=$Row[$myModule_Table."_PictureFile"]?></td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Tag</td>
<td height="22" class="table_col2"><?=$Row[$myModule_Table."_Tag"]?>
</td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Activity
Detail </td>
</tr>
<tr align="center" valign="top">
<td height="350" colspan="2" class="table_col2"><table width="100%" height="300" border="0" align="center" cellpadding="1" cellspacing="1" bordercolorlight="#000000" bordercolordark="#E0E0E0" bgcolor="#AAAAAA" class="table_border" id="htmltool_table">
<tr>
<td valign="top" bgcolor="#FFFFFF">
<?
$filename = $myModule_Path_HTMLFiles."/".$Row[$myModule_Table."_HtmlFile"];
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
echo $contents;
?>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="24" border="0" cellpadding="3" cellspacing="0">
<tr align="right">
<td height="30" colspan="4" align="center" class="table_footer">
<table width="300" border="0" cellspacing="0" cellpadding="2">
<tr align="center">
<? if($System_Session_Permission[$SystemMenuID]=="RW" ){ ?>
<td><input name="btEdit" type="button" class="button_80" id="btEdit" value="Edit" onclick="
document.myForm.action.value='edit';
document.myForm.submit();
" /> </td>
<? }?>
<td> <input name="btCalcel" type="button" class="button_80" id="btCalcel" onclick="
if(confirm('Are you sure to return to list?')) {
document.myReturnForm.submit();
}
" value="Cancel" /> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</form>
</table>
<br />
<br />
<?
####################################################################
} else if($action=="add") {
$HTMLToolContentBG = "#FFFFFF";
$myTimeArray = explode(":",$myTime);
$myTimeHH=$myTimeArray [0]*1;
$myTimeMM=$myTimeArray [1]*1;
?>
<br />
<? include("htmltool/header.php"); ?>
<!-- import the calendar script -->
<link rel="stylesheet" type="text/css" href="../css/myCalendarStyle.css" />
<script type="text/javascript" src="lib/calendar.js"></script>
<script type="text/javascript" src="lib/lang/calendar-th.js"></script>
<script type="text/javascript" src="lib/loadcalendar.js"></script>
<!-- end the calendar script -->
<table width="98%" border="0" cellpadding="0" cellspacing="1" class="table_header">
<form action="?" method="post" name="myReturnForm" id="myReturnForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" value="" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
</form>
<form action="?" method="post" name="myForm" id="myForm" enctype="multipart/form-data">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" value="addnew" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
<tr>
<td bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td height="24" colspan="2" align="center" class="menu_table_header">Add
New
<?=getMenuName($SystemMenuID)?>
</td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Date
Information
<input name="inputMod_Calendar_TimeFrom" type="hidden" id="inputMod_Calendar_TimeFrom" />
<input name="inputMod_Calendar_TimeTo" type="hidden" id="inputMod_Calendar_TimeTo" /></td>
</tr>
<tr>
<td width="140" height="22" align="right" class="table_col1">Date </td>
<td height="22" class="table_col2"><table border="0" cellspacing="0" cellpadding="1">
<tr>
<td nowrap="nowrap">From </td>
<td><input name="inputMod_Calendar_DateFrom" type="text" class="input_center" id="inputMod_Calendar_DateFrom" value="<?=$myDate?>" size="10" maxlength="10" /></td>
<td> <input type="button" class="button_th_normal" onclick="return showCalendar('inputMod_Calendar_DateFrom', 'y-mm-dd');" value=" ... " />
</td>
<td width="25" align="right"><input name="inputIsDateTo" type="checkbox" id="inputIsDateTo" value="Yes" onclick="if(document.getElementById('idDateTo1').style.display=='') { document.getElementById('idDateTo1').style.display='none'; document.getElementById('idDateTo2').style.display='none'; } else { document.getElementById('idDateTo1').style.display=''; document.getElementById('idDateTo2').style.display=''; } " /></td>
<td nowrap="nowrap">To </td>
<td id="idDateTo1" style="display:none">
<input name="inputMod_Calendar_DateTo" type="text" class="input_center" id="inputMod_Calendar_DateTo" value="<?=$myDate?>" size="10" maxlength="10" /></td>
<td id="idDateTo2" style="display:none">
<input type="button" class="button_th_normal" onclick="return showCalendar('inputMod_Calendar_DateTo', 'y-mm-dd');" value=" ... " /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Time </td>
<td height="22" class="table_col2"><table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="30">From</td>
<td><select name="inputTimeFromHH" class="select" id="inputTimeFromHH">
<? for($i=0;$i<=23;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeHH==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td><b>:</b></td>
<td><select name="inputTimeFromMM" class="select" id="inputTimeFromMM">
<? for($i=0;$i<=59;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeMM==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td width="37" align="right"><input name="inputIsTimeTo" type="checkbox" id="inputIsTimeTo" value="Yes" onclick="if(document.getElementById('idTimeTo1').style.display=='') { document.getElementById('idTimeTo1').style.display='none'; document.getElementById('idTimeTo2').style.display='none'; document.getElementById('idTimeTo3').style.display='none'; } else { document.getElementById('idTimeTo1').style.display=''; document.getElementById('idTimeTo2').style.display=''; document.getElementById('idTimeTo3').style.display=''; } " /></td>
<td nowrap="nowrap">To </td>
<td id="idTimeTo1" style="display:none"><select name="inputTimeToHH" class="select" id="inputTimeToHH">
<? for($i=0;$i<=23;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeHH==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td id="idTimeTo2" style="display:none"><b>:</b></td>
<td id="idTimeTo3" style="display:none"><select name="inputTimeToMM" class="select" id="inputTimeToMM">
<? for($i=0;$i<=59;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeMM==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td width="140" height="22" align="right" class="table_col1">Group </td>
<td height="22" class="table_col2">
<select name="inputGroupID" id="inputGroupID" class="select">
<?
$sql = "SELECT * FROM ".$myModule_Table1Group." WHERE ".$myModule_Table1Group."_Language = '$System_Session_Language'";
$QueryCalendarGroup=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
while($RowCalendarGroup=MYSQL_FETCH_ARRAY($QueryCalendarGroup)){
?>
<option value="<?=$RowCalendarGroup[$myModule_Table1Group."_ID"]?>"><?=$RowCalendarGroup[$myModule_Table1Group."_Name"]?></option>
<? }?>
</select></td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Activity
Information </td>
</tr>
<tr>
<td width="140" height="22" align="right" class="table_col1">Subject </td>
<td height="22" class="table_col2"> <input name="inputMod_Calendar_Subject" type="text" class="input_left" id="inputBasicInput" size="50" maxlength="250" /></td>
</tr>
<tr>
<td width="140" height="22" align="right" class="table_col1">Location </td>
<td height="22" class="table_col2"><textarea name="inputMod_Calendar_Location" cols="50" rows="6" class="input_textarea" id="inputMod_Calendar_Location"></textarea></td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Link Url </td>
<td height="22" class="table_col2"><input type="text" name="inputMod_Calendar_Url" class="input_left" id="inputMod_Calendar_Url" value="http://"size="80" maxlength="100" /></td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Files</td>
</tr><tr>
<td height="22" align="right" class="table_col1">Document Files </td>
<td height="22" class="table_col2"><table border="0" cellpadding="2" cellspacing="0" id="contentTable">
<tr>
<td><input name="inputFileUpload[]" type="file" class="input_left" id="inputFileUpload" size="35" /></td>
<td align="center"><img src="../system/images/bullet/minus_disable.gif" width="11" height="11" /></td>
</tr>
<tr>
<td align="right"> </td>
<td align="center"><img src="../system/images/bullet/ico481.gif" width="16" height="10" onmouseover="this.style.cursor='hand'" onclick="insertRow('contentTable')" alt="add" /></td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
function insertRow(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
myObj.insertRow(myNumRow-1);
for(i=0;i<myNumCol;i++) {
myObj.rows[myNumRow-1].insertCell();
}
myObj.rows[myNumRow-1].cells[0].innerHTML = '<input name="inputFileUpload[]" type="file" class="input_left" id="inputFileUpload" size="35">';
myObj.rows[myNumRow-1].cells[1].align = "center";
myObj.rows[myNumRow-1].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'ContentTable\','+(myNumRow-1)+')">';
formatTable(tableName);
}
function deleteRow(tableName,myRowDelete) {
var myObj=document.getElementById(tableName);
myObj.deleteRow(myRowDelete);
formatTable(tableName);
}
function formatTable(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
if(myNumRow>2) {
for(i=0;i<myNumRow-1;i++) {
myObj.rows[i].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'contentTable\','+i+')" alt="delete">';
}
} else {
myObj.rows[0].cells[1].innerHTML = '<img src="../system/images/bullet/minus_disable.gif" width="11" height="11">';
}
}
function funcMultipleAddNew(myListObj,myText) {
if(myText!='') myListObj.options[myListObj.options.length] = new Option(myText,myText,0,false);
}
</script>
<span class="mytable_col2">
<script language="JavaScript" type="text/javascript">
restoreContentData();
function restoreContentData() {
//alert($inputFileUpload[0]);
<?
for ($index=0;$index<count($inputFileUpload)-1;$index++) {
echo "insertRow('contentTable');";
}
for ($index=0;$index<count($inputFileUpload);$index++) {
$array_visible = "";
if (count($inputFileUpload)>1) $array_visible = "[".$index."]";
echo "document.myForm.inputFileUpload".$array_visible.".value = '".$inputFileUpload[$index]."';";
}
?>
}
function insertRow(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
myObj.insertRow(myNumRow-1);
for(i=0;i<myNumCol;i++) {
myObj.rows[myNumRow-1].insertCell();
}
myObj.rows[myNumRow-1].cells[0].innerHTML = '<input name="inputFileUpload[]" type="file" class="input_left" id="inputFileUpload" size="35">';
myObj.rows[myNumRow-1].cells[1].align = "center";
myObj.rows[myNumRow-1].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'ContentTable\','+(myNumRow-1)+')">';
formatTable(tableName);
}
function deleteRow(tableName,myRowDelete) {
var myObj=document.getElementById(tableName);
myObj.deleteRow(myRowDelete);
formatTable(tableName);
}
function formatTable(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
if(myNumRow>2) {
for(i=0;i<myNumRow-1;i++) {
myObj.rows[i].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'contentTable\','+i+')" alt="delete">';
}
} else {
myObj.rows[0].cells[1].innerHTML = '<img src="../system/images/bullet/minus_disable.gif" width="11" height="11">';
}
}
function AddList(fromList,toList) {
var array_insert_value = new Array();
var array_insert_name = new Array();
var mysize = 0;
for (i=0;i<fromList.options.length;i++) {
if (fromList.options[i].selected) {
found = false;
for (j=0;j<toList.options.length;j++) {
if (toList.options[j].value==fromList.options[i].value) found = true;
}
if (!found) {
array_insert_name[mysize] = fromList.options[i].text;
array_insert_value[mysize] = fromList.options[i].value;
mysize++;
}
}
}
for (i=0;i<array_insert_value.length;i++) toList.options[toList.options.length] = new Option(array_insert_name[i],array_insert_value[i]);
}
/*
function previewMemberPhoto(memberid) {
if (memberid>0) {
document.getElementById('previewPhotoArea').innerHTML = '<a href="'+ShowSubDomain(memberid)+'" target="_blank"><strong>'+member_name[memberid]+'</strong><br><img src="'+member_photo[memberid]+'" width="80" border="0"></a><br><br><font color="#BBBBBB"><preview image></font>';
} else {
document.getElementById('previewPhotoArea').innerHTML = '';
}
}
*/
function funcMultipleRemoveOnly(myListObj) {
var Len = myListObj.options.length;
if(Len>0) {
for(var i=0;i<Len;i++) {
if (myListObj.options[i]!=null && myListObj.options[i].selected) {
myListObj.options[i--] = null;
}
}
}
}
</script>
</span></td>
</tr>
<tr style="display:none; ">
<td width="140" height="22" align="right" class="table_col1">
Thumbnail Picture </td>
<td height="22" class="table_col2"><input name="inputThumbnailPicture" type="file" class="input_left" id="inputThumbnailPicture" contenteditable="false" size="35" accept="application/msexcel" onchange="
myfile = this.value;
if(myfile!='') {
myfile = myfile.toLowerCase();
Temp = myfile.charAt(myfile.length-4) + myfile.charAt(myfile.length-3) + myfile.charAt(myfile.length-2) + myfile.charAt(myfile.length-1);
if(Temp=='.jpg' || Temp=='.gif' || Temp=='jpeg') {
document.getElementById('PreviewImage').src=myfile;
document.getElementById('PreviewImageText').innerHTML= document.getElementById('PreviewImage').width + 'x' + document.getElementById('PreviewImage').height + ' pixel';
} else {
alert('System allow to upload image files only.');
this.focus();
}
} else {
alert('Please click Browse button to select thumbnail picture file.');
this.focus();
}
" onmouseout="
if(document.getElementById('PreviewImage').width>1 && document.getElementById('PreviewImage').height>1) {
document.getElementById('PreviewImageText').innerHTML= document.getElementById('PreviewImage').width + 'x' + document.getElementById('PreviewImage').height + ' pixel';
}
" /></td>
</tr>
<tr style="display:none; ">
<td height="22" align="right" class="table_col1"> </td>
<td height="22" class="table_col2">Recommended to use
a picture file size as 100x100 pixel ( or a square size
picture).</td>
</tr>
<tr style="display:none; ">
<td width="140" height="22" align="right" valign="top" class="table_col1">Preview
</td>
<td height="22" valign="top" class="table_col2"><div style="height:100;width:435;overflow:auto" align="left" valign="middle">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="120" align="center" valign="middle"><img src="images/blank.gif" name="PreviewImage" id="PreviewImage" /></td>
<td align="right"><div id="PreviewImageText"> </div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Tag</td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Tag </td>
<td height="22" class="table_col2"><table width="80%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td valign="top"> </td>
<td align="center" valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" align="center" bgcolor="#7093C2"><strong><font color="#FFFFFF">Tag</font></strong></td>
</tr>
</table>
<select name="inputSelectAssign[]" size="8" multiple="multiple" id="inputSelectAssign" style="width:150">
</select></td>
<td align="center"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="button" name="Button" value="<< Add" class="button_80" onclick="
AddList(document.myForm.inputListUserAssign,document.myForm.inputSelectAssign);
" /></td>
</tr>
<tr>
<td height="50"> </td>
</tr>
<tr>
<td><input type="button" name="Button" value="Delete >>" class="button_80" onclick="
var found = 0;
for (i=0;i<document.myForm.inputSelectAssign.options.length;i++) {
if (document.myForm.inputSelectAssign.options[i].selected) found = 1;
}
if (found==1) {
funcMultipleRemoveOnly(document.myForm.inputSelectAssign);
}
" /></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" align="center" bgcolor="#7093C2"><strong><font color="#FFFFFF">Tag ������</font></strong></td>
</tr>
</table>
<select name="inputListUserAssign[]" size="8" multiple="multiple" id="inputListUserAssign" style="width:150">
<?
$sql = "SELECT * FROM ".$myModule_TableTag;
$Query_Tag = mysql_query($sql);
?>
<? while ($Row_Tag = mysql_fetch_array($Query_Tag)) { ?>
<option value="<?=$Row_Tag[$myModule_TableTag."_Detail"]?>" >
<?=$Row_Tag[$myModule_TableTag."_Detail"]?>
</option>
<? } ?>
</select></td>
</tr>
</table> </td>
<td align="center" valign="bottom" id="previewPhotoArea"><input type="button" name="Button32" value="Delete >>" class="button_80" onclick="
var found = 0;
for (i=0;i<document.myForm.inputListUserAssign.options.length;i++) {
if (document.myForm.inputListUserAssign.options[i].selected) found = 1;
}
if (found==1) {
funcMultipleRemoveOnly(document.myForm.inputListUserAssign);
}
" /></td>
</tr>
<tr>
<td valign="top"> </td>
<td align="right" valign="top"><input name="inputEmail" type="text" class="input_left" id="inputEmail" size="22" maxlength="100" />
</td>
<td align="center" id="previewPhotoArea"><input type="button" name="Button2" value="<< Add" class="button_80" onclick="
funcMultipleAddNew( elements['inputSelectAssign[]'] , inputEmail.value );
" /></td>
</tr>
<tr>
<td valign="top"> </td>
<td align="center" valign="top"> </td>
<td align="center" id="previewPhotoArea"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Activity
Detail</td>
</tr>
<tr align="center" valign="top">
<td height="300" colspan="2" class="table_col2"><table width="100%" height="500" border="0" align="center" cellpadding="1" cellspacing="1" bordercolorlight="#000000" bordercolordark="#E0E0E0" bgcolor="#AAAAAA" class="table_border" id="htmltool_table">
<tr>
<td height="50" align="center" class="table_col3">
<? include("htmltool/toolbar.php"); ?>
</td>
</tr>
<tr>
<td align="center" class="table_col2">
<? include("htmltool/textarea.php"); ?>
</td>
</tr>
</table><script language="JavaScript" type="text/javascript">
fnInit(idContent);
</script> </td>
</tr>
<tr align="left" valign="top">
<td colspan="2" align="right" class="table_col2">Use
<span class="text_hilight">Shift+Enter</span>
to make a new row.</td>
</tr>
<tr align="center">
<td height="22" colspan="2" class="table_col1">
</td>
</tr>
</table>
<table width="100%" height="24" border="0" cellpadding="3" cellspacing="0">
<tr align="right">
<td height="30" colspan="4" align="center" class="table_footer">
<table width="300" border="0" cellspacing="0" cellpadding="2">
<tr align="center">
<td> <script language="JavaScript" type="text/javascript">
function isBlank(myObj) { if(myObj.value=='') { return true; } return false; }
function isNumber(myObj) { return !isNaN(myObj.value*1) }
function verifySubmit() {
with(document.myForm) {
if(isBlank(inputMod_Calendar_Subject)) { inputMod_Calendar_Subject.focus(); return false; }
inputMod_Calendar_TimeFrom.value=inputTimeFromHH.value+":"+inputTimeFromMM.value+":00";
inputMod_Calendar_TimeTo.value=inputTimeToHH.value+":"+inputTimeToMM.value+":00";
for (var i=0;i<document.myForm.inputSelectAssign.length;i++) {
document.myForm.inputSelectAssign.options[i].selected = true;
}
fnSave();
}
document.myForm.submit();
}
</script> <input name="btAdd" type="button" class="button_80" id="btAdd" value="Add" onclick="verifySubmit();" />
</td>
<td> <input name="btCalcel" type="button" class="button_80" id="btCalcel" onclick="
if(confirm('Are you sure to return to list?')) {
document.myReturnForm.submit();
}
" value="Cancel" /> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</form>
</table>
<br />
<br />
<?
#########################################################
} else if($action=="addnew") {
if(strlen($inputMod_Calendar_DateFrom)!=10) { $inputMod_Calendar_DateFrom="0000-00-00"; }
if(strlen($inputMod_Calendar_DateTo)!=10) { $inputMod_Calendar_DateTo="0000-00-00"; }
if($inputIsDateTo=="") { $inputMod_Calendar_DateTo="0000-00-00"; }
if($inputIsTimeTo=="") { $inputMod_Calendar_TimeTo="00:00:00"; }
if( strlen($inputMod_Calendar_DateFrom)>0 && strlen($inputMod_Calendar_DateTo)>0 && $inputMod_Calendar_DateFrom!="0000-00-00" && $inputMod_Calendar_DateTo!="0000-00-00" ) {
if(strcmp($inputMod_Calendar_DateFrom,$inputMod_Calendar_DateTo)<1) {
// Do nothing.
} else {
// Switch Date
$myTmp = $inputMod_Calendar_DateFrom;
$inputMod_Calendar_DateFrom = $inputMod_Calendar_DateTo;
$inputMod_Calendar_DateTo = $myTmp;
}
}
if($inputMod_Calendar_DateTo=="0000-00-00") { $inputMod_Calendar_DateTo=$inputMod_Calendar_DateFrom; }
$sql = "INSERT INTO ".$myModule_Table."(".$myModule_Table."_ModuleKey,".$myModule_Table."_DateFrom,".$myModule_Table."_DateTo,".$myModule_Table."_TimeFrom,".$myModule_Table."_TimeTo,".$myModule_Table."_Subject,".$myModule_Table."_Location,".$myModule_Table."_Url,".$myModule_Table."_CreateByID,".$myModule_Table."_CreateBy,".$myModule_Table."_CreateDate,".$myModule_Table."_LastUpdate,".$myModule_Table."_Status,".$myModule_Table."_Language ,".$myModule_Table."_GroupID) VALUES('$SystemModuleKey','$inputMod_Calendar_DateFrom','$inputMod_Calendar_DateTo','$inputMod_Calendar_TimeFrom','$inputMod_Calendar_TimeTo','".changeQuot($inputMod_Calendar_Subject)."','".changeQuot($inputMod_Calendar_Location)."','$inputMod_Calendar_Url','$System_Session_User_ID','$System_Session_UserName',NOW(),NOW(),'Enable','$System_Session_Language','$inputGroupID')";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$sql = "SELECT MAX(".$myModule_Table."_ID) FROM ".$myModule_Table;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
$MaxID = $Row[0];
srand(make_seed());
$myrand = rand(1111,9999);
// Check to create module data directory. ---------
if(!is_dir($System_RelativePath_Upload."/".$SystemModuleKey)) { mkdir($System_RelativePath_Upload."/".$SystemModuleKey,0777); }
if(!is_dir($myModule_Path_ThumbnailPicture)) { mkdir($myModule_Path_ThumbnailPicture,0777); }
if(!is_dir($myModule_Path_HTMLFiles)) { mkdir($myModule_Path_HTMLFiles,0777); }
if(!is_dir($myModule_Path_ImageLibrary)) { mkdir($myModule_Path_ImageLibrary,0777); }
if(!is_dir($myModule_Path_UploadFiles)) { mkdir($myModule_Path_UploadFiles,0777); }
// ------------------------------------------------
$HTMLFileName = "$MaxID-$myrand.html";
$HTMLToolContent=stripslashes($HTMLToolContent);
$fp = fopen ($myModule_Path_HTMLFiles."/".$HTMLFileName, "w+");
fwrite($fp,$HTMLToolContent);
fclose($fp);
$sql = "UPDATE ".$myModule_Table." SET ".$myModule_Table."_HtmlFile='$HTMLFileName' WHERE ".$myModule_Table."_ID=".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
/*
for($i=0; $i<=count($inputFileUpload); $i++){
srand(make_seed());
$myrand = rand(1111,9999);
$LastFileArray=explode(".",$inputFileUpload_name[$i]);
$LastFile=$LastFileArray[count($LastFileArray)-1];
$StrFileName=$MaxID."_".$myrand.".".$LastFile;
if($inputFileUpload[$i]!=""){
if(file_exists($myModule_Path_UploadFiles."/".$StrFileName)) {
unlink($myModule_Path_UploadFiles."/".$StrFileName);
}
//echo $inputFileUpload[$i].",".$myModule_FullPath_UploadFiles."/".$StrFileName;
if(copy($inputFileUpload[$i],$myModule_Path_UploadFiles."/".$StrFileName)) {
chmod($myModule_Path_UploadFiles."/".$StrFileName,0777);
}
$sql = " INSERT INTO ".$myModule_Table1_FileUpload."(".$myModule_Table1_FileUpload."_CalID ,".$myModule_Table1_FileUpload."_FileUpload , ".$myModule_Table1_FileUpload."_FileUploadName)".
" VALUES ($MaxID,'$StrFileName','$LastFileArray[0]') ";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error : �Դ�����Դ��Ҵ <br>$sql<br>\n");
}
}//end for
*/
include"function_mod.php";
///////-- Attach Files ------------//
if( isset( $_FILES[inputFileUpload][tmp_name] ) ){
for($i=0; $i < count( $_FILES[inputFileUpload][tmp_name] ); $i++){
$exts = explode(".", $_FILES[inputFileUpload][name][$i]);
$ext = strtolower(($exts[count($exts) - 1]));
$tmpName = $_FILES[inputFileUpload][tmp_name][$i];
$fileName = $_FILES[inputFileUpload][name][$i];
$fileSize = imgGetFileSize($_FILES[inputFileUpload][size][$i]);
$myrand = rand(1111,9999);
$path = $MaxID."-".$myrand."." . $ext;
$paths= $myModule_Path_FileUpload ."/". $path;
if ($_FILES[inputFileUpload][error][$i]==0) {
if ($_FILES[inputFileUpload][type][$i]) $mimeType = $_FILES[inputFileUpload][type][$i];
else $mimeType = "application/unknown";
if( move_uploaded_file($_FILES[inputFileUpload][tmp_name][$i], $paths) ){
//sql
$insert[$myModule_Table1_FileUpload."_CalID"] = "$MaxID";
$insert[$myModule_Table1_FileUpload."_FileUpload"] = "'$path'";
$insert[$myModule_Table1_FileUpload."_FileUploadName"] = "'$fileName'";
$sql="INSERT INTO ".$myModule_Table1_FileUpload." (".implode(",",array_keys($insert)).") VALUES (".implode(",",array_values($insert)).")";
mysql_query($sql) or die("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
}
}
}
unset($insert);
}//end check file.
//------- end add file ---------
if(is_file($inputThumbnailPicture)) {
$ImageData = getimagesize($inputThumbnailPicture);
if($ImageData!=NULL) {
if($ImageData[2]==1) {
$ImageType="gif";
} elseif($ImageData[2]==2) {
$ImageType="jpg";
}
$ThumbnailPictureName = "$MaxID-$myrand.$ImageType";
if(file_exists($myModule_Path_ThumbnailPicture."/".$ThumbnailPictureName)) {
unlink($myModule_Path_ThumbnailPicture."/".$ThumbnailPictureName);
}
if(copy($inputThumbnailPicture,$myModule_Path_ThumbnailPicture."/".$ThumbnailPictureName)) {
chmod($myModule_Path_ThumbnailPicture."/".$ThumbnailPictureName,0777);
}
$sql = "UPDATE ".$myModule_Table1." SET ".$myModule_Table1."_PictureFile='$ThumbnailPictureName' WHERE ".$myModule_Table1."_ID=".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
}
}
for ($index=0;$index<count($inputSelectAssign);$index++) {
$sql = "SELECT * FROM ".$myModule_TableTag." WHERE ".$myModule_TableTag."_Detail = '$inputSelectAssign[$index]'";
$QueryTag=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$RowTag=MYSQL_FETCH_ARRAY($QueryTag);
if($RowTag[0]==""){
$sql="INSERT INTO ".$myModule_TableTag." (".$myModule_TableTag."_Detail) VALUES('$inputSelectAssign[$index]')";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
}
$tag.=$inputSelectAssign[$index].",";
}
$sql = "UPDATE ".$myModule_Table1." SET ".$myModule_Table1."_Tag='$tag' WHERE ".$myModule_Table1."_ID=".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
?>
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
</form>
<script language="JavaScript" type="text/javascript"> document.myForm.submit(); </script>
<?
####################################################################
} else if($action=="edit") {
$myCheckBoxID=0;
for($i=1;$i<=$TotalCheckBoxID;$i++) {
$myVar="CheckBoxID".$i;
if(strlen($$myVar)>0) {
$myCheckBoxID=$$myVar;
}
}
$sql="SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_ID=".$myCheckBoxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
$HTMLsrcSTR=$Row[$myModule_Table."_HtmlFile"];
$HTMLsrc = $myModule_Path_HTMLFiles."/".$Row[$myModule_Table."_HtmlFile"];
$HTMLToolContentBG = "#FFFFFF";
?>
<br />
<? include("htmltool/header.php"); ?>
<!-- import the calendar script -->
<link rel="stylesheet" type="text/css" href="../css/myCalendarStyle.css" />
<script type="text/javascript" src="lib/calendar.js"></script>
<script type="text/javascript" src="lib/lang/calendar-th.js"></script>
<script type="text/javascript" src="lib/loadcalendar.js"></script>
<!-- end the calendar script -->
<table width="98%" border="0" cellpadding="0" cellspacing="1" class="table_header">
<form action="?" method="post" name="myReturnForm" id="myReturnForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" value="" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
</form>
<form action="?" method="post" name="myForm" id="myForm" enctype="multipart/form-data">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" value="update" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
<input name="CheckBoxID1" type="hidden" id="CheckBoxID1" value="<?=$myCheckBoxID?>" />
<tr>
<td bgcolor="#FFFFFF"> <table width="98%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td height="24" colspan="2" align="center" class="menu_table_header">Edit
<?=getMenuName($SystemMenuID)?>
</td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Date
Information
<input name="inputMod_Calendar_TimeFrom" type="hidden" id="inputMod_Calendar_TimeFrom" />
<input name="inputMod_Calendar_TimeTo" type="hidden" id="inputMod_Calendar_TimeTo" /></td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">Date </td>
<td height="22" class="table_col2"> <table border="0" cellspacing="0" cellpadding="1">
<tr>
<td nowrap="nowrap">
<? $myTmpDate = substr($Row[$myModule_Table."_DateFrom"],0,10); ?>
<? $myTmpDateTo = substr($Row[$myModule_Table."_DateTo"],0,10); ?>
From </td>
<td><input name="inputMod_Calendar_DateFrom" type="text" class="input_center" id="inputMod_Calendar_DateFrom" value="<? if($myTmpDate!="0000-00-00") { echo $myTmpDate; } ?>" size="10" maxlength="10" />
<? $myTmpDate = substr($Row[$myModule_Table."_DateTo"],0,10); ?>
</td>
<td> <input type="button" class="button_th_normal" onclick="return showCalendar('inputMod_Calendar_DateFrom', 'y-mm-dd');" value=" ... " />
</td>
<td width="25" align="right"><input name="inputIsDateTo" type="checkbox" id="inputIsDateTo" value="Yes" onclick="if(document.getElementById('idDateTo1').style.display=='') { document.getElementById('idDateTo1').style.display='none'; document.getElementById('idDateTo2').style.display='none'; } else { document.getElementById('idDateTo1').style.display=''; document.getElementById('idDateTo2').style.display=''; } " <? if($myTmpDate!="0000-00-00") { echo " checked"; } ?> /></td>
<td nowrap="nowrap">To </td>
<td id="idDateTo1" <? if($myTmpDate=="0000-00-00") { ?>style="display:none"<? } ?>>
<input name="inputMod_Calendar_DateTo" type="text" class="input_center" id="inputMod_Calendar_DateTo" value="<?=$Row[$myModule_Table."_DateTo"]?>" size="10" maxlength="10" /></td>
<td id="idDateTo2" <? if($myTmpDate=="0000-00-00") { ?>style="display:none"<? } ?>>
<input type="button" class="button_th_normal" onclick="return showCalendar('inputMod_Calendar_DateTo', 'y-mm-dd');" value=" ... " /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="right" class="table_col1">
<?
$myTime = explode(":",$Row[$myModule_Table."_TimeFrom"]);
$myTimeHH = $myTime[0]*1;
$myTimeMM = $myTime[1]*1;
?>
Time </td>
<td height="22" class="table_col2"><table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="30">From</td>
<td><select name="inputTimeFromHH" class="select" id="inputTimeFromHH">
<? for($i=0;$i<=23;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeHH==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td><b>:</b></td>
<td><select name="inputTimeFromMM" class="select" id="inputTimeFromMM">
<? for($i=0;$i<=59;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeMM==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td width="37" align="right">
<?
$myTime = explode(":",$Row[$myModule_Table."_TimeTo"]);
$myTimeHH = $myTime[0]*1;
$myTimeMM = $myTime[1]*1;
?>
<input name="inputIsTimeTo" type="checkbox" id="inputIsTimeTo" value="Yes" onclick="if(document.getElementById('idTimeTo1').style.display=='') { document.getElementById('idTimeTo1').style.display='none'; document.getElementById('idTimeTo2').style.display='none'; document.getElementById('idTimeTo3').style.display='none'; } else { document.getElementById('idTimeTo1').style.display=''; document.getElementById('idTimeTo2').style.display=''; document.getElementById('idTimeTo3').style.display=''; } " <? if($Row[$myModule_Table."_TimeTo"]!="00:00:00") { echo " checked"; } ?> /></td>
<td nowrap="nowrap">To </td>
<td id="idTimeTo1" <? if($Row[$myModule_Table."_TimeTo"]=="00:00:00") { ?>style="display:none"<? } ?>><select name="inputTimeToHH" class="select" id="inputTimeToHH">
<? for($i=0;$i<=23;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeHH==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td id="idTimeTo2" <? if($Row[$myModule_Table."_TimeTo"]=="00:00:00") { ?>style="display:none"<? } ?>><b>:</b></td>
<td id="idTimeTo3" <? if($Row[$myModule_Table."_TimeTo"]=="00:00:00") { ?>style="display:none"<? } ?>><select name="inputTimeToMM" class="select" id="inputTimeToMM">
<? for($i=0;$i<=59;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeMM==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td width="140" height="22" align="right" class="table_col1">Group </td>
<td height="22" class="table_col2">
<select name="inputGroupID" id="inputGroupID" class="select">
<?
$sql = "SELECT * FROM ".$myModule_Table1Group;
$QueryCalendarGroup=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
while($RowCalendarGroup=MYSQL_FETCH_ARRAY($QueryCalendarGroup)){
?>
<option value="<?=$RowCalendarGroup[$myModule_Table1Group."_ID"]?>" <? if($RowCalendarGroup[$myModule_Table1Group."_ID"]==$Row[$myModule_Table."_GroupID"]){ echo "selected";}?>><?=$RowCalendarGroup[$myModule_Table1Group."_Name"]?></option>
<? }?>
</select></td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Activity
Information </td>
</tr>
<tr>
<td width="140" height="22" align="right" class="table_col1">Subject </td>
<td height="22" class="table_col2"> <input name="inputMod_Calendar_Subject" type="text" class="input_left" id="inputYes" size="40" maxlength="250" value="<?=$Row[$myModule_Table."_Subject"]?>" /></td>
</tr>
<tr>
<td width="140" height="22" align="right" class="table_col1">Location </td>
<td height="22" class="table_col2"><textarea name="inputMod_Calendar_Location" cols="50" rows="6" class="input_textarea" id="inputMod_Calendar_Location"><?=$Row[$myModule_Table."_Location"]?></textarea></td>
</tr>
<tr>
<td width="140" height="22" align="right" class="table_col1">Link Url </td>
<td height="22" class="table_col2"><input type="text" name="inputMod_Calendar_Url" class="input_left" id="inputMod_Calendar_Url" size="80" maxlength="100" value="<?=$Row[$myModule_Table."_Url"]?>" /></td>
</tr>
<tr>
<td height="26" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Files</td>
</tr>
<tr>
<td width="140" align="right" class="table_col1">Document Files</td>
<td class="table_col2"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="50%"><input name="inputTypeFile" type="radio" id="inputTypeFile" onclick="document.getElementById('File1').style.display='';document.getElementById('File2').style.display='none';" value="insert" checked="checked" />
������� ����</td>
<td><input name="inputTypeFile" id="inputTypeFile" type="radio" value="update" onclick="document.getElementById('File2').style.display=''; document.getElementById('File1').style.display='none';" />
�������¹�ŧ ������ </td>
</tr>
<tr>
<td id="File1" style="display: "><?
$sqlFile = "SELECT * FROM ".$myModule_Table1_FileUpload." WHERE ".$myModule_Table1_FileUpload."_CalID = '".$myCheckBoxID."'";
$QueryFile=MYSQL_DB_QUERY($System_DataBase_Name,$sqlFile) or die(mysql_error());
while ($RowFile=MYSQL_FETCH_ARRAY($QueryFile)){
$LinkRelativePath = $myModule_Path_UploadFiles."/".$RowFile[$myModule_Table1_FileUpload."_FileUpload"];
$DownloadFile = $RowFile[$myModule_Table1_FileUpload."_FileUpload"];
$ImageType = strstr($DownloadFile,'.');
if($ImageType==".pdf"){
$TypeImgFile="../../images/bullet/pdf.gif";
}elseif($ImageType==".txt"){
$TypeImgFile="../../images/bullet/file.gif";
}elseif($ImageType==".xls"){
$TypeImgFile="../../images/bullet/excel.gif";
}elseif($ImageType==".ppt"){
$TypeImgFile="../../images/bullet/pp.gif";
}elseif($ImageType==".rtf"){
$TypeImgFile="../../images/bullet/word.gif";
}elseif($ImageType==".rar"){
$TypeImgFile="../../images/bullet/rar.gif";
}else{
$TypeImgFile="../../images/bullet/application.gif";
}
?><br /><a href="<?=$LinkRelativePath?>" target="_blank"><strong>
<img src="<?=$TypeImgFile?>" border="0" alt="<?=$ImageType?>" /> <?=$RowFile[$myModule_Table1_FileUpload."_FileUploadName"];?>
</strong></a>
<? }?> <table border="0" cellpadding="2" cellspacing="0" id="contentTable">
<tr>
<td><input name="inputFile[]" type="file" class="input_left" id="inputFile[]" size="35" /></td>
<td align="center"><img src="../system/images/bullet/minus_disable.gif" width="11" height="11" /></td>
</tr>
<tr>
<td align="right"> </td>
<td align="center"><img src="../system/images/bullet/ico481.gif" width="16" height="10" onmouseover="this.style.cursor='hand'" onclick="insertRow('contentTable')" alt="add" /></td>
</tr>
</table>
<span class="mytable_col2">
<script language="JavaScript" type="text/javascript">
restoreContentData();
function restoreContentData() {
//alert($inputFile[0]);
<?
for ($index=0;$index<count($inputFile)-1;$index++) {
echo "insertRow('contentTable');";
}
for ($index=0;$index<count($inputFile);$index++) {
$array_visible = "";
if (count($inputFile)>1) $array_visible = "[".$index."]";
echo "document.myForm.inputFile".$array_visible.".value = '".$inputFile[$index]."';";
}
?>
}
function insertRow(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
myObj.insertRow(myNumRow-1);
for(i=0;i<myNumCol;i++) {
myObj.rows[myNumRow-1].insertCell();
}
myObj.rows[myNumRow-1].cells[0].innerHTML = '<input name="inputFile[]" type="file" class="input_left" id="inputFile" size="35">';
myObj.rows[myNumRow-1].cells[1].align = "center";
myObj.rows[myNumRow-1].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'ContentTable\','+(myNumRow-1)+')">';
formatTable(tableName);
}
function deleteRow(tableName,myRowDelete) {
var myObj=document.getElementById(tableName);
myObj.deleteRow(myRowDelete);
formatTable(tableName);
}
function formatTable(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
if(myNumRow>2) {
for(i=0;i<myNumRow-1;i++) {
myObj.rows[i].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'contentTable\','+i+')" alt="delete">';
}
} else {
myObj.rows[0].cells[1].innerHTML = '<img src="../system/images/bullet/minus_disable.gif" width="11" height="11">';
}
}
function funcMultipleAddNew(myListObj,myText) {
if(myText!='') myListObj.options[myListObj.options.length] = new Option(myText,myText,0,false);
}
</script>
</span></td>
<td valign="top" id="File2" style="display:none "><table border="0" cellpadding="2" cellspacing="0" id="contentTable2">
<tr>
<td><input name="inputFile[]" type="file" class="input_left" id="inputFile[]" size="35" /></td>
<td align="center"><img src="../system/images/bullet/minus_disable.gif" width="11" height="11" /></td>
</tr>
<tr>
<td align="right"> </td>
<td align="center"><img src="../system/images/bullet/ico481.gif" width="16" height="10" onmouseover="this.style.cursor='hand'" onclick="insertRow('contentTable2')" alt="add" /></td>
</tr>
</table>
<span class="mytable_col2">
<script language="JavaScript" type="text/javascript">
restoreContentData();
function restoreContentData() {
//alert($inputFile[0]);
<?
for ($index=0;$index<count($inputFile)-1;$index++) {
echo "insertRow('contentTable');";
}
for ($index=0;$index<count($inputFile);$index++) {
$array_visible = "";
if (count($inputFile)>1) $array_visible = "[".$index."]";
echo "document.myForm.inputFile".$array_visible.".value = '".$inputFile[$index]."';";
}
?>
}
function insertRow(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
myObj.insertRow(myNumRow-1);
for(i=0;i<myNumCol;i++) {
myObj.rows[myNumRow-1].insertCell();
}
myObj.rows[myNumRow-1].cells[0].innerHTML = '<input name="inputFile[]" type="file" class="input_left" id="inputFile" size="35">';
myObj.rows[myNumRow-1].cells[1].align = "center";
myObj.rows[myNumRow-1].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'ContentTable\','+(myNumRow-1)+')">';
formatTable(tableName);
}
function deleteRow(tableName,myRowDelete) {
var myObj=document.getElementById(tableName);
myObj.deleteRow(myRowDelete);
formatTable(tableName);
}
function formatTable(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
if(myNumRow>2) {
for(i=0;i<myNumRow-1;i++) {
myObj.rows[i].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'contentTable\','+i+')" alt="delete">';
}
} else {
myObj.rows[0].cells[1].innerHTML = '<img src="../system/images/bullet/minus_disable.gif" width="11" height="11">';
}
}
function funcMultipleAddNew(myListObj,myText) {
if(myText!='') myListObj.options[myListObj.options.length] = new Option(myText,myText,0,false);
}
</script>
</span></td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
restoreContentData();
function restoreContentData() {
//alert($inputFile[0]);
<?
for ($index=0;$index<count($inputFile)-1;$index++) {
echo "insertRow('contentTable');";
}
for ($index=0;$index<count($inputFile);$index++) {
$array_visible = "";
if (count($inputFile)>1) $array_visible = "[".$index."]";
echo "document.myForm.inputFile".$array_visible.".value = '".$inputFile[$index]."';";
}
?>
}
function insertRow(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
myObj.insertRow(myNumRow-1);
for(i=0;i<myNumCol;i++) {
myObj.rows[myNumRow-1].insertCell();
}
myObj.rows[myNumRow-1].cells[0].innerHTML = '<input name="inputFile[]" type="file" class="input_left" id="inputFile" size="35">';
myObj.rows[myNumRow-1].cells[1].align = "center";
myObj.rows[myNumRow-1].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'ContentTable\','+(myNumRow-1)+')">';
formatTable(tableName);
}
function deleteRow(tableName,myRowDelete) {
var myObj=document.getElementById(tableName);
myObj.deleteRow(myRowDelete);
formatTable(tableName);
}
function formatTable(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
if(myNumRow>2) {
for(i=0;i<myNumRow-1;i++) {
myObj.rows[i].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'contentTable\','+i+')" alt="delete">';
}
} else {
myObj.rows[0].cells[1].innerHTML = '<img src="../system/images/bullet/minus_disable.gif" width="11" height="11">';
}
}
function AddList(fromList,toList) {
var array_insert_value = new Array();
var array_insert_name = new Array();
var mysize = 0;
for (i=0;i<fromList.options.length;i++) {
if (fromList.options[i].selected) {
found = false;
for (j=0;j<toList.options.length;j++) {
if (toList.options[j].value==fromList.options[i].value) found = true;
}
if (!found) {
array_insert_name[mysize] = fromList.options[i].text;
array_insert_value[mysize] = fromList.options[i].value;
mysize++;
}
}
}
for (i=0;i<array_insert_value.length;i++) toList.options[toList.options.length] = new Option(array_insert_name[i],array_insert_value[i]);
}
function funcMultipleRemoveOnly(myListObj) {
var Len = myListObj.options.length;
if(Len>0) {
for(var i=0;i<Len;i++) {
if (myListObj.options[i]!=null && myListObj.options[i].selected) {
myListObj.options[i--] = null;
}
}
}
}</script></td>
</tr>
<tr style="display:none;">
<td height="22" align="right" class="table_col1">Thumbnail Picture </td>
<td height="22" class="table_col2"><input name="inputThumbnailPicture" type="file" class="input_left" id="inputThumbnailPicture" size="35" contenteditable="false" accept="application/msexcel" onchange="
myfile = document.myForm.inputThumbnailPicture.value;
if(myfile!='') {
myfile = myfile.toLowerCase();
Temp = myfile.charAt(myfile.length-4) + myfile.charAt(myfile.length-3) + myfile.charAt(myfile.length-2) + myfile.charAt(myfile.length-1);
if(Temp=='.jpg' || Temp=='.gif' || Temp=='jpeg') {
document.getElementById('PreviewNewImage').src=myfile;
document.getElementById('PreviewNewImageText').innerHTML= document.getElementById('PreviewNewImage').width + 'x' + document.getElementById('PreviewNewImage').height + ' pixel';
} else {
alert('System allow to upload image files only.');
document.myForm.inputThumbnailPicture.focus();
}
} else {
alert('Please click Browse button to select thumbnail picture file.');
document.myForm.inputThumbnailPicture.focus();
}
" value="Preview" onmouseout="
if(document.getElementById('PreviewNewImage').width>1 && document.getElementById('PreviewNewImage').height>1) {
document.getElementById('PreviewNewImageText').innerHTML= document.getElementById('PreviewNewImage').width + 'x' + document.getElementById('PreviewNewImage').height + ' pixel';
}
" /></td>
</tr>
<tr style="display:none; ">
<td height="22" align="right" class="table_col1"> </td>
<td height="22" class="table_col2">Keep blank to use an old thumbmail picture. Recommended to use a picture file size as 100x100 pixel ( or a square size picture).</td>
</tr>
<tr style="display:none; ">
<td height="22" align="right" valign="top" class="table_col1"> </td>
<td height="22" valign="top" class="table_col2"><div style="height:100;width:435;overflow:auto" align="left" valign="middle">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="120" align="center" valign="middle"><img src="../images/blank.gif" name="PreviewImage" border="0" id="PreviewNewImage" /></td>
<td align="right"><div id="PreviewNewImageText"> </div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td height="22" align="right" class="table_col1"> </td>
<td height="22" class="table_col2"><table width="80%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td valign="top"> </td>
<td align="center" valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" align="center" bgcolor="#7093C2"><strong><font color="#FFFFFF">Tag</font></strong></td>
</tr>
</table>
<? $tag = explode(",",$Row[$myModule_Table."_Tag"])?>
<select name="inputSelectAssign[]" size="8" multiple="multiple" id="inputSelectAssign" style="width:150">
<?
for($i=0; $i<=count($tag)-2; $i++){
?>
<option value="<?=$tag[$i]?>">
<?=$tag[$i]?>
</option>
<?
}
?>
</select></td>
<td align="center"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="button" name="Button3" value="<< Add" class="button_80" onclick="
AddList(document.myForm.inputListUserAssign,document.myForm.inputSelectAssign);
" /></td>
</tr>
<tr>
<td height="50"> </td>
</tr>
<tr>
<td><input type="button" name="Button3" value="Delete >>" class="button_80" onclick="
var found = 0;
for (i=0;i<document.myForm.inputSelectAssign.options.length;i++) {
if (document.myForm.inputSelectAssign.options[i].selected) found = 1;
}
if (found==1) {
funcMultipleRemoveOnly(document.myForm.inputSelectAssign);
}
" /></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" align="center" bgcolor="#7093C2"><strong><font color="#FFFFFF">Tag ������</font></strong></td>
</tr>
</table>
<select name="inputListUserAssign[]" size="8" multiple="multiple" id="inputListUserAssign" style="width:150">
<?
$sql = "SELECT * FROM ".$myModule_TableTag;
//$sql = "SELECT ".$myModule_FriendList."_FriendMemberID FROM ".$myModule_FriendList." WHERE ".$myModule_FriendList."_MemberID=".$Member_Session_User_ID." AND ".$myModule_FriendList."_FriendMemberID NOT IN (0".$blockfriendidstr.")";
$Query_Tag = mysql_query($sql);
?>
<? while ($Row_Tag = mysql_fetch_array($Query_Tag)) { ?>
<option value="<?=$Row_Tag[$myModule_TableTag."_Detail"]?>" >
<?=$Row_Tag[$myModule_TableTag."_Detail"]?>
</option>
<? } ?>
</select>
</td>
</tr>
</table></td>
<td align="center" valign="bottom"><input type="button" name="Button32" value="Delete >>" class="button_80" onclick="
var found = 0;
for (i=0;i<document.myForm.inputSelectAssign.options.length;i++) {
if (document.myForm.inputSelectAssign.options[i].selected) found = 1;
}
if (found==1) {
funcMultipleRemoveOnly(document.myForm.inputListUserAssign);
}
" /></td>
</tr>
<tr>
<td valign="top"> </td>
<td align="right" valign="top"><input name="inputEmail" type="text" class="input_left" id="inputEmail" size="22" maxlength="100" />
</td>
<td align="center" id="previewPhotoArea"><input type="button" name="Button22" value="<< Add" class="button_80" onclick="
funcMultipleAddNew( elements['inputSelectAssign[]'] , inputEmail.value );
" /></td>
</tr>
<tr>
<td valign="top"> </td>
<td align="center" valign="top"> </td>
<td align="center" id="previewPhotoArea"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" colspan="2" class="table_col3"> <img src="../images/bullet/box21.gif" width="11" height="11" /> Activity
Detail</td>
</tr>
<tr align="center" valign="top">
<td height="300" colspan="2" class="table_col2"><table width="100%" height="500" border="0" align="center" cellpadding="1" cellspacing="1" bordercolorlight="#000000" bordercolordark="#E0E0E0" bgcolor="#AAAAAA" class="table_border" id="htmltool_table">
<tr>
<td height="50" align="center" class="table_col3">
<? include("htmltool/toolbar.php"); ?>
</td>
</tr>
<tr>
<td align="center" class="table_col2">
<? include("htmltool/textarea.php"); ?>
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
fnInit(idContent);
</script></td>
</tr>
<tr align="left" valign="top">
<td colspan="2" align="right" class="table_col2">Use
<span class="text_hilight">Shift+Enter</span>
to make a new row.</td>
</tr>
<tr align="center">
<td height="22" colspan="2" class="table_col1">
</td>
</tr>
</table>
<table width="100%" height="24" border="0" cellpadding="3" cellspacing="0">
<tr align="right">
<td height="30" colspan="4" align="center" class="table_footer">
<table width="300" border="0" cellspacing="0" cellpadding="2">
<tr align="center">
<td> <script language="JavaScript" type="text/javascript">
function isBlank(myObj) { if(myObj.value=='') { return true; } return false; }
function isNumber(myObj) { return !isNaN(myObj.value*1) }
function verifySubmit() {
with(document.myForm) {
if(isBlank(inputMod_Calendar_Subject)) { inputMod_Calendar_Subject.focus(); return false; }
inputMod_Calendar_TimeFrom.value=inputTimeFromHH.value+":"+inputTimeFromMM.value+":00";
inputMod_Calendar_TimeTo.value=inputTimeToHH.value+":"+inputTimeToMM.value+":00";
for (var i=0;i<document.myForm.inputSelectAssign.length;i++) {
document.myForm.inputSelectAssign.options[i].selected = true;
}
fnSave();
}
document.myForm.submit();
}
</script> <input name="btAdd" type="button" class="button_80" id="btAdd" value="Save" onclick="verifySubmit();" />
</td>
<td> <input name="btCalcel" type="button" class="button_80" id="btCalcel" onclick="
if(confirm('Are you sure to return to list?')) {
document.myReturnForm.submit();
}
" value="Cancel" /> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</form>
</table>
<br />
<br />
<?
#########################################################
} else if($action=="update") {
$MaxID = $CheckBoxID1;
if(strlen($inputMod_Calendar_DateFrom)!=10) { $inputMod_Calendar_DateFrom="0000-00-00"; }
if(strlen($inputMod_Calendar_DateTo)!=10) { $inputMod_Calendar_DateTo="0000-00-00"; }
if($inputIsDateTo=="") { $inputMod_Calendar_DateTo="0000-00-00"; }
if($inputIsTimeTo=="") { $inputMod_Calendar_TimeTo="00:00:00"; }
if( strlen($inputMod_Calendar_DateFrom)>0 && strlen($inputMod_Calendar_DateTo)>0 && $inputMod_Calendar_DateFrom!="0000-00-00" && $inputMod_Calendar_DateTo!="0000-00-00" ) {
if(strcmp($inputMod_Calendar_DateFrom,$inputMod_Calendar_DateTo)<1) {
// Do nothing.
} else {
// Switch Date
$myTmp = $inputMod_Calendar_DateFrom;
$inputMod_Calendar_DateFrom = $inputMod_Calendar_DateTo;
$inputMod_Calendar_DateTo = $myTmp;
}
}
if($inputMod_Calendar_DateTo=="0000-00-00") { $inputMod_Calendar_DateTo=$inputMod_Calendar_DateFrom; }
$sql = "UPDATE ".$myModule_Table." SET ".$myModule_Table."_DateFrom = '$inputMod_Calendar_DateFrom',".$myModule_Table."_DateTo = '$inputMod_Calendar_DateTo',".$myModule_Table."_TimeFrom = '$inputMod_Calendar_TimeFrom',".$myModule_Table."_TimeTo = '$inputMod_Calendar_TimeTo',".$myModule_Table."_Subject = '".changeQuot($inputMod_Calendar_Subject)."',".$myModule_Table."_Location = '".changeQuot($inputMod_Calendar_Location)."',".$myModule_Table."_Url = '$inputMod_Calendar_Url',".$myModule_Table."_LastUpdate=NOW(),".$myModule_Table."_GroupID = '$inputGroupID' WHERE ".$myModule_Table."_ID=".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
srand(make_seed());
$myrand = rand(1111,9999);
// Check to create module data directory. ---------
if(!is_dir($System_RelativePath_Upload."/".$SystemModuleKey)) { mkdir($System_RelativePath_Upload."/".$SystemModuleKey,0777); }
if(!is_dir($myModule_Path_ThumbnailPicture)) { mkdir($myModule_Path_ThumbnailPicture,0777); }
if(!is_dir($myModule_Path_HTMLFiles)) { mkdir($myModule_Path_HTMLFiles,0777); }
if(!is_dir($myModule_Path_ImageLibrary)) { mkdir($myModule_Path_ImageLibrary,0777); }
if(!is_dir($myModule_Path_UploadFiles)) { mkdir($myModule_Path_UploadFiles,0777); }
include"function_mod.php";
///////-- Attach Files ------------//
if( isset( $_FILES[inputFile][tmp_name] ) ){
for($i=0; $i < count( $_FILES[inputFile][tmp_name] ); $i++){
$exts = explode(".", $_FILES[inputFile][name][$i]);
$ext = strtolower(($exts[count($exts) - 1]));
$tmpName = $_FILES[inputFile][tmp_name][$i];
$fileName = $_FILES[inputFile][name][$i];
$fileSize = imgGetFileSize($_FILES[inputFile][size][$i]);
$myrand = rand(1111,9999);
$path = $MaxID."-".$myrand."." . $ext;
$paths= $myModule_Path_FileUpload ."/". $path;
if ($_FILES[InputFile][error][$i]==0) {
if ($_FILES[inputFile][type][$i]) $mimeType = $_FILES[inputFile][type][$i];
else $mimeType = "application/unknown";
if( move_uploaded_file($_FILES[inputFile][tmp_name][$i], $paths) ){
//sql
$insert[$myModule_Table1_FileUpload."_CalID"] = "$MaxID";
$insert[$myModule_Table1_FileUpload."_FileUpload"] = "'$path'";
$insert[$myModule_Table1_FileUpload."_UploadFileName"] = "'$fileName'";
$sql="INSERT INTO ".$myModule_Table1_FileUpload." (".implode(",",array_keys($insert)).") VALUES (".implode(",",array_values($insert)).")";
mysql_query($sql) or die("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
}
}
}
unset($insert);
}//end check file.
//------- end add file ---------
// ------------------------------------------------
$sql = "SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_ID=".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
$HTMLFileName = $Row[$myModule_Table."_HtmlFile"];
if(file_exists($myModule_Path_HTMLFiles."/".$HTMLFileName)) {
unlink($myModule_Path_HTMLFiles."/".$HTMLFileName);
}
/*
$HTMLFileName = $myModule_Table."_HtmlFile-$MaxID-$myrand.html";
$HTMLToolContent=stripslashes($DataHTML1);
$fp = fopen ($myModule_Path_HTMLFiles."/".$HTMLFileName, "w+");
fwrite($fp,$HTMLToolContent);
fclose($fp);
$sql = "UPDATE ".$myModule_Table." SET ".$myModule_Table."_HtmlFile='$HTMLFileName' WHERE ".$myModule_Table."_ID=".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
*/
$HTMLFileName = "$MaxID-$myrand.html";
$HTMLToolContent=stripslashes($HTMLToolContent);
$fp = fopen ($myModule_Path_HTMLFiles."/".$HTMLFileName, "w+");
fwrite($fp,$HTMLToolContent);
fclose($fp);
$sql = "UPDATE ".$myModule_Table." SET ".$myModule_Table."_HtmlFile='$HTMLFileName' WHERE ".$myModule_Table."_ID=".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
if(is_file($inputThumbnailPicture)) {
$sql = "SELECT ".$myModule_Table."_PictureFile FROM ".$myModule_Table." WHERE ".$myModule_Table."_ID = ".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
while($RowUnlinkImg = MYSQL_FETCH_ARRAY($Query)){
unlink($myModule_Path_ThumbnailPicture."/".$RowUnlinkImg[0]);
}
$ImageData = getimagesize($inputThumbnailPicture);
if($ImageData!=NULL) {
if($ImageData[2]==1) {
$ImageType="gif";
} elseif($ImageData[2]==2) {
$ImageType="jpg";
}
$ThumbnailPictureName = "$MaxID-$myrand.$ImageType";
if(file_exists($myModule_Path_ThumbnailPicture."/".$ThumbnailPictureName)) {
unlink($myModule_Path_ThumbnailPicture."/".$ThumbnailPictureName);
}
if(copy($inputThumbnailPicture,$myModule_Path_ThumbnailPicture."/".$ThumbnailPictureName)) {
chmod($myModule_Path_ThumbnailPicture."/".$ThumbnailPictureName,0777);
}
$sql = "UPDATE ".$myModule_Table." SET ".$myModule_Table."_PictureFile='$ThumbnailPictureName' WHERE ".$myModule_Table."_ID=".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
}
}
for ($index=0;$index<count($inputSelectAssign);$index++) {
$sql = "SELECT * FROM ".$System_Tag." WHERE ".$System_Tag."_Detail = '$inputSelectAssign[$index]'";
$QueryTag=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$RowTag=MYSQL_FETCH_ARRAY($QueryTag);
if($RowTag[0]==""){
$sql="INSERT INTO ".$System_Tag." (".$System_Tag."_Detail) VALUES('$inputSelectAssign[$index]')";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
}
$tag.=$inputSelectAssign[$index].",";
}
$sql = "UPDATE ".$myModule_Table." SET ".$myModule_Table."_Tag='$tag' WHERE ".$myModule_Table."_ID=".$MaxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
?>
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
</form>
<script language="JavaScript" type="text/javascript"> document.myForm.submit(); </script>
<?
#########################################################
} else if($action=="delete") {
for($i=1;$i<=$TotalCheckBoxID;$i++) {
$myVar="CheckBoxID".$i;
if(strlen($$myVar)>0) {
$sql = "SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_ID=".$$myVar;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
if(strlen($Row[$myModule_Table."_HtmlFile"])>0) {
if(file_exists($myModule_Path_HTMLFiles."/".$Row[$myModule_Table."_HtmlFile"])) {
unlink($myModule_Path_HTMLFiles."/".$Row[$myModule_Table."_HtmlFile"]);
}
}
$sql = "SELECT * FROM ".$myModule_Table1_FileUpload." WHERE ".$myModule_Table1_FileUpload."_CalID=".$$myVar;
$QueryCal=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
while($RowCal=MYSQL_FETCH_ARRAY($QueryCal)){
if(strlen($RowCal[$myModule_Table1_FileUpload."_FileUpload"])>0) {
if(file_exists($myModule_Path_UploadFiles."/".$RowCal[$myModule_Table1_FileUpload."_FileUpload"])) {
unlink($myModule_Path_UploadFiles."/".$RowCal[$myModule_Table1_FileUpload."_FileUpload"]);
}
}
}// end while
$sql = "DELETE FROM ".$myModule_Table1_FileUpload." WHERE ".$myModule_Table1_FileUpload."_CalID=".$$myVar;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$sql = "DELETE FROM ".$myModule_Table." WHERE ".$myModule_Table."_ID=".$$myVar;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
}
}
?>
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
</form>
<script language="JavaScript" type="text/javascript"> document.myForm.submit(); </script>
<?
#########################################################
} else if($action=="setstatus") {
$myCheckBoxID=0;
for($i=1;$i<=$TotalCheckBoxID;$i++) {
$myVar="CheckBoxID".$i;
if(strlen($$myVar)>0) {
$myCheckBoxID=$$myVar;
}
}
$sql="UPDATE ".$myModule_Table." SET ".$myModule_Table."_Status='$SelectStatus' WHERE ".$myModule_Table."_ID=".$myCheckBoxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
?>
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
</form>
<script language="JavaScript" type="text/javascript"> document.myForm.submit(); </script>
<?
#########################################################
} else {
?>
<?
# Check to set default value #########################
if($PageSize=="") { $PageSize = $SystemModule_defaultPageSize; }
if($PageShow=="") { $PageShow = $SystemModule_defaultPageShow; }
if($ASCDESC=="") { $ASCDESC = $SystemModule_ASCDESC; }
if($OrderBy=="") { $OrderBy = $SystemModule_OrderBy; }
if($action=="switchorder") {
if($ASCDESC=="ASC") { $ASCDESC = "DESC"; } else { $ASCDESC="ASC"; }
}
if($PageSearch!="") { $PageSearch=trim($PageSearch); }
# Count total record size #########################
$today=date("Y-m-d");
echo $sql = "SELECT * FROM crm_mod_calendar where crm_mod_calendar_Contactname='$System_Session_UserName' AND crm_mod_calendar_DateFrom='$today' ";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("<br><br><b><font color=#FF0000>�������ö��ҹ�к���<br>�ҡ�س�����ҹ�繤����á<br><a href=\"#\" onClick=\"Popup('popupCreateDatabaseWindow','createdatabase.php',220,180,1);\">��سҤ��꡷����</a><br>���ͷӡ�����ҧ�ҹ����������</font></b>\n");
if($PageSearch=="") {
$today=date("Y-m-d");
echo $sql = "SELECT * FROM crm_mod_calendar where crm_mod_calendar_Contactname='$System_Session_UserName' AND crm_mod_calendar_DateFrom='$today' ";
} else {
$today=date("Y-m-d");
$sql = "SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_Language='".$System_Session_Language."' AND ".$myModule_Table."_ModuleKey='$SystemModuleKey' AND ( ".
" ".$myModule_Table."_DateFrom LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_DateTo LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_TimeFrom LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_TimeTo LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_Subject LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_Location LIKE '%$PageSearch%' ".
")";
}
//die($sql);
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$TotalRecordCount=MYSQL_NUMROWS($Query);
# Find max page size #########################
if($TotalRecordCount>$PageSize) {
$NoOfPage= ceil($TotalRecordCount/$PageSize);
} else {
$NoOfPage=1;
}
# Recover page show into range #########################
if($PageShow>$NoOfPage) { $PageShow=$NoOfPage; }
# Select only paging range #########################
$RecordStart = ($PageShow-1)*$PageSize;
if($PageSearch=="") {
if($toolbarGroupSearch!=""){
$sql = "SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_Contactname='$toolbarGroupSearch' ORDER BY $OrderBy $ASCDESC LIMIT $RecordStart , $PageSize";
} else {
$sql = "SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_Language='".$System_Session_Language."' AND ".$myModule_Table."_ModuleKey='$SystemModuleKey' ORDER BY $OrderBy $ASCDESC LIMIT $RecordStart , $PageSize";
}
} else {
$sql = "SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_Language='".$System_Session_Language."' AND ".$myModule_Table."_ModuleKey='$SystemModuleKey' AND ( ".
" ".$myModule_Table."_DateFrom LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_DateTo LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_TimeFrom LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_TimeTo LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_Subject LIKE '%$PageSearch%' ".
" OR ".$myModule_Table."_Location LIKE '%$PageSearch%' ".
") ORDER BY $OrderBy $ASCDESC LIMIT $RecordStart , $PageSize";
}
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
$RecordCount=MYSQL_NUMROWS($Query);
?>
<script language="JavaScript" type="text/javascript">
function Paging_CheckAll(objCheckHeader,txtCheckBoxFirstName,intTotalItems) {
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
document.getElementById(txtCheckBoxFirstName+i).checked = objCheckHeader.checked;
return true;
}
function Paging_CheckAllHandle(objCheckHeader,txtCheckBoxFirstName,intTotalItems) {
var isCheckedAll = true;
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
if(!document.getElementById(txtCheckBoxFirstName+i).checked)
isCheckedAll = false;
objCheckHeader.checked = isCheckedAll;
return true;
}
function Paging_CountChecked(txtCheckBoxFirstName,intTotalItems) {
var intChecked = 0;
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
if(document.getElementById(txtCheckBoxFirstName+i).checked)
intChecked ++;
return intChecked ;
}
function Paging_CheckedThisItem(objCheckHeader,indexing,txtCheckBoxFirstName,intTotalItems) {
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
if(i==indexing) {
document.getElementById(txtCheckBoxFirstName+i).checked = true;
} else {
document.getElementById(txtCheckBoxFirstName+i).checked = false;
}
objCheckHeader.checked = false;
return true;
}
</script>
<div id="divDataPicker" style="display:none; position:absolute; top:-115px; left:180px; width: 200px; z-index: 1;">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="table_border">
<form action="?" method="post" name="myStatusForm" id="myStatusForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<tr>
<td height="22"><table width="100%" height="22" border="0" cellpadding="0" cellspacing="0" class="table_header">
<tr>
<td width="28" align="center"><img src="../images/icon/ico439.gif" width="19" height="15" /></td>
<td align="center">Select Status</td>
<td width="22" align="center"><img src="../images/icon/ico215.gif" width="16" height="16" onmouseover="this.style.cursor='hand'" onclick="document.getElementById('divDataPicker').style.display='none'; " /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="120" align="center" class="table_row1"><br />
<table width="120" border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="26" height="22" align="center"><input name="toolbarStatus" type="radio" class="form_checkbox" value="Enable" checked="checked" /></td>
<td height="22" class="text_bold">Enable</td>
</tr>
<tr>
<td width="26" height="22" align="center"><input name="toolbarStatus" type="radio" class="form_checkbox" value="Disable" /></td>
<td height="22" class="text_bold">Disable</td>
</tr>
</table>
<br /> <table border="0" cellspacing="0" cellpadding="6">
<tr>
<td height="30"><input name="btSave" type="button" class="button_th_60" id="btSave" value="Save" onclick="
if(document.myStatusForm.toolbarStatus[0].checked) {
document.myForm.SelectStatus.value=document.myStatusForm.toolbarStatus[0].value;
}
if(document.myStatusForm.toolbarStatus[1].checked) {
document.myForm.SelectStatus.value=document.myStatusForm.toolbarStatus[1].value;
}
document.myForm.action.value='setstatus';
Paging_CheckedThisItem(document.myForm.CheckBoxAll, StatusIndex ,'CheckBoxID', document.myForm.TotalCheckBoxID.value );
document.myForm.submit();
" /></td>
<td><input name="btClose" type="button" class="button_th_60" id="btClose" value="Close" onclick="document.getElementById('divDataPicker').style.display='none';" /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="6" class="table_footer"><img src="../images/blank.gif" width="1" height="1" /></td>
</tr>
</form>
</table>
</div>
<script language="JavaScript" type="text/javascript">
var StatusIndex=0;
function ShowDataPicker(myDivName,RefX,RefY) {
document.getElementById(myDivName).style.display='';
document.getElementById(myDivName).style.left = document.body.scrollLeft + window.event.clientX + RefX;
document.getElementById(myDivName).style.top= document.body.scrollTop+ window.event.clientY + RefY;
}
</script>
<table width="95%" height="24" border="0" cellpadding="3" cellspacing="0" align="center">
<form action="?" method="post" name="mySearchForm" id="mySearchForm" onsubmit="return false;">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<tr align="right">
<td colspan="4" align="right" class="table_footer">
<table border="0" align="right" cellpadding="2" cellspacing="0" class="table_footer" >
<tr>
<td>Contact Name </td>
<td><select name="toolbarGroupSearch" id="toolbarGroupSearch" class="select" onchange="document.mySearchForm.submit();">
<option> </option>
<?
$sql = "SELECT DISTINCT crm_mod_calendar_Contactname FROM crm_mod_calendar ";
$QueryGroup=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: �Դ�����Դ��Ҵ <br>$sql<br>\n");
while($RowGroup = MYSQL_FETCH_ARRAY($QueryGroup)){
?>
<option value="<?=$RowGroup[$myModule_Table1."_Contactname"]?>"><?=$RowGroup[$myModule_Table1."_Contactname"]?></option>
<? }?>
</select></td>
<td><input name="toolbarPageSearch" type="text" class="input_left" id="toolbarPageSearch" value="<?=$PageSearch?>" size="20" maxlength="50" /></td>
<td><input name="btPageSearch" type="button" class="button_60" id="btPageSearch" value="Search" onclick="
document.myForm.PageSearch.value=document.mySearchForm.toolbarPageSearch.value;
document.myForm.submit();
" /></td>
</tr>
</table>
<br />
<br />
</td>
</tr>
</form>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" class="table_border">
<tr>
<td bgcolor="#FFFFFF"> <table style="border-collapse: collapse" bordercolor="#E8E7E1" width="100%" border="1" cellpadding="0" cellspacing="1">
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<input name="action" type="hidden" id="action" />
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>" />
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>" />
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>" />
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>" />
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>" />
<input name="SelectStatus" type="hidden" id="SelectStatus" />
<tr align="center" class="menu_table_header">
<td width="26" height="24" bgcolor="#F7F6F0"><input name="CheckBoxAll" type="checkbox" class="form_checkbox" id="CheckBoxAll" value="Yes" onclick="Paging_CheckAll(this,'CheckBoxID',document.myForm.TotalCheckBoxID.value)" /></td>
<td width="34" height="24" align="center" bgcolor="#F7F6F0"><a href="#" class="link_headbar" style="font-weight: bold" onclick="
with(document.myForm) {
<? if($OrderBy==$myOrderBy) { echo "action.value='switchorder';\n"; } ?>
OrderBy.value='<?=$myOrderBy?>';
submit();
}">No.</a></td>
<td width="120" height="24" bgcolor="#F7F6F0"><span style="font-weight: bold"><a href="#" class="link_headbar" onclick="
with(document.myForm) {
<? if($OrderBy==$myOrderBy) { echo "action.value='switchorder';\n"; } ?>
OrderBy.value='<?=$myOrderBy?>';
submit();
}
">Date</a> /
<a href="#" class="link_headbar" onclick="
with(document.myForm) {
<? if($OrderBy==$myOrderBy) { echo "action.value='switchorder';\n"; } ?>
OrderBy.value='<?=$myOrderBy?>';
submit();
}
">Time</a></span></td>
<td width="454" height="24" bgcolor="#F7F6F0"><span style="font-weight: bold"><a href="#" class="link_headbar" onclick="
with(document.myForm) {
<? if($OrderBy==$myOrderBy) { echo "action.value='switchorder';\n"; } ?>
OrderBy.value='<?=$myOrderBy?>';
submit();
}
">Subject</a> /
<a href="#" class="link_headbar" onclick="
with(document.myForm) {
<? if($OrderBy==$myOrderBy) { echo "action.value='switchorder';\n"; } ?>
OrderBy.value='<?=$myOrderBy?>';
submit();
}
">Location</a></span></td>
<td width="83" height="24" bgcolor="#F7F6F0"><span style="color: #a43708; font-weight: bold">Action</span></td>
</tr>
<?
$index=1;
if($RecordCount>0) {
while($index<$RecordCount+1) {
if($myClassRow=="table_row1") { $myClassRow="table_row2"; } else { $myClassRow="table_row1"; }
$Row=MYSQL_FETCH_ARRAY($Query);
?>
<tr class="<?=$myClassRow?>" onmouseover="this.className='table_rowover'" onmouseout="this.className='<?=$myClassRow?>'">
<td width="26" height="36" align="center"> <input name="CheckBoxID<?=$index?>" type="checkbox" class="form_checkbox" id="CheckBoxID<?=$index?>" onclick="Paging_CheckAllHandle(document.myForm.CheckBoxAll,'CheckBoxID',document.myForm.TotalCheckBoxID.value)" value="<?=$Row[$myModule_Table."_ID"]?>" /></td>
<td width="34" height="36" align="center">
<? if($ASCDESC=="DESC") { echo $RecordStart+$index; } else { echo ($TotalRecordCount-($RecordStart+$index)+1); } ?> </td>
<td width="120" height="36" align="center"> <table border="0" align="left" cellpadding="1" cellspacing="0">
<?
if($Row[$myModule_Table."_DateFrom"]==$Row[$myModule_Table."_DateTo"]) {
?>
<tr>
<td align="right"><b>Date</b></td>
<td>
<?=ShowDateEn($Row[$myModule_Table."_DateFrom"])?> </td>
</tr>
<?
} else {
if($Row[$myModule_Table."_DateTo"]=="0000-00-00") {
?>
<tr>
<td align="right"><b>From</b></td>
<td>
<?=ShowDateEn($Row[$myModule_Table."_DateFrom"])?> </td>
</tr>
<?
} else {
?>
<tr>
<td align="right"><b>From</b></td>
<td>
<?=ShowDateEn($Row[$myModule_Table."_DateFrom"])?> </td>
</tr>
<?
?>
<tr>
<td align="right"><b>To</b></td>
<td>
<?=ShowDateEn($Row[$myModule_Table."_DateTo"])?> </td>
</tr>
<?
}
}
if($Row[$myModule_Table."_TimeFrom"]==$Row[$myModule_Table."_TimeTo"]) {
?>
<tr>
<td align="right"><b>Time</b></td>
<td>
<?=substr($Row[$myModule_Table."_TimeFrom"],0,5)?> </td>
</tr>
<?
} else {
if($Row[$myModule_Table."_TimeTo"]=="00:00:00") {
?>
<tr>
<td align="right"><b>Time</b></td>
<td>
<?=substr($Row[$myModule_Table."_TimeFrom"],0,5)?> </td>
</tr>
<?
} else {
?>
<tr>
<td align="right"><b>Time</b></td>
<td>
<?=substr($Row[$myModule_Table."_TimeFrom"],0,5)." - ".substr($Row[$myModule_Table."_TimeTo"],0,5)?> </td>
</tr>
<?
}
}
?>
</table></td>
<td height="36"> <table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td><span class="text_bold"><a href="#" onclick="
Paging_CheckedThisItem( document.myForm.CheckBoxAll, <?=$index?>, 'CheckBoxID', document.myForm.TotalCheckBoxID.value );
document.myForm.action.value='view';
document.myForm.submit();
">
<?=$Row[$myModule_Table."_Subject"]?>
</a></span></td>
</tr>
<? if(strlen(trim($Row[$myModule_Table."_Location"]))>0 ) { ?>
<tr>
<td>
<?=$Row[$myModule_Table."_Location"]?> </td>
</tr>
<? } ?>
</table></td>
<td width="83" height="36" align="center" valign="middle">
<table border="0" cellspacing="0" cellpadding="1">
<tr align="center" valign="bottom">
<td><img src="../../img/icons/view.png" alt="View" width="16" height="16" border="0" onmouseover="this.style.cursor='hand'" onclick="
Paging_CheckedThisItem( document.myForm.CheckBoxAll, <?=$index?>, 'CheckBoxID', document.myForm.TotalCheckBoxID.value );
document.myForm.action.value='view';
document.myForm.submit();
" /></td>
<? if($System_Session_Permission[$SystemMenuID]=="RW" ){ ?>
<td><img src="../images/icon/ico425.gif" alt="Edit" width="16" height="16" border="0" onmouseover="this.style.cursor='hand'" onclick="
if(confirm('Are you sure to edit this record?')) {
Paging_CheckedThisItem( document.myForm.CheckBoxAll, <?=$index?>, 'CheckBoxID', document.myForm.TotalCheckBoxID.value );
document.myForm.action.value='edit';
document.myForm.submit();
}
" /></td>
<td><img src="../images/icon/ico417.gif" alt="Delete" width="16" height="16" border="0" onmouseover="this.style.cursor='hand'" onclick="
if(confirm('Are you sure to delete this record?')) {
Paging_CheckedThisItem( document.myForm.CheckBoxAll, <?=$index?>, 'CheckBoxID', document.myForm.TotalCheckBoxID.value );
document.myForm.action.value='delete';
document.myForm.submit();
}
" /></td>
<? }?>
</tr>
</table></td>
</tr>
<?
$index++;
}
} else { ?>
<tr class="table_row1">
<td height="80" colspan="5" align="center">Data
not found!</td>
</tr>
<? } ?>
<input name="TotalCheckBoxID" type="hidden" id="TotalCheckBoxID" value="<?=$index-1?>" />
</form>
</table>
</td>
</tr>
</form>
</table>
<table width="95%" height="22" border="0" align="center" cellpadding="2" cellspacing="0">
<form action="?" method="post" name="myFooterButton" id="myFooterButton" onsubmit="return false;">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>" />
<tr>
<td valign="top"><div id="pager">
<div align="left">Page
<?
if($NoOfPage>1) {
?>
<select name="toolbarPageShow" class="select" onchange="document.myForm.PageShow.value=this.value; document.myForm.submit(); ">
<?
if($NoOfPage<$SystemModule_MaxPage) {
// Show page list #########################
for($i=1;$i<=$NoOfPage;$i++) {
echo "<option value=\"$i\"";
if($i==$PageShow) { echo " selected"; }
echo ">$i</option>";
}
} else {
// # If total page count greater than default max page value then reduce page select size #########################
$starti = $PageShow-$SystemModule_ReduceRange;
if($starti<1) { $starti=1; }
$endi = $PageShow+$SystemModule_ReduceRange;
if($endi>$NoOfPage) { $endi=$NoOfPage; }
//#####################
for($i=$starti ;$i<=$endi;$i++) {
echo "<option value=\"$i\"";
if($i==$PageShow) { echo " selected"; }
echo ">$i</option>";
}
}
?>
</select>
<?
} else {
echo "1";
}
?>
of
<?=$NoOfPage?>
| Total
<?=$TotalRecordCount?>
records found </div>
</div></td>
</tr>
</form>
</table>
<br />
<?
}
#########################################################
?>
</div>
<!-- InstanceEndEditable -->
</div>
<div id="sidebar">
<ul>
<li>
<h3><a href="../../home/home.php" class="house">หน้าหลัก </a></h3>
<h3><a href="#" class="house">ระบบผู้ใช้งาน</a></h3>
<ul>
<li><a href="../user_management.php" class="report">ข้อมูลผู้ใช้งานในระบบ</a></li>
</ul>
</li>
<li>
<h3><a href="#" class="folder_table">ระบบเก็บข้อมูลลูกค้า</a></h3>
<ul>
<li><a href="../mod_customer/index.php" class="addorder">ข้อมูลลูกค้า</a></li>
</ul>
</li>
<li>
<h3><a href="#" class="folder_table">ระบบปฏิทินงาน</a></h3>
<ul>
<li><a href="../mod_calendar/calendar.php" class="manage_page">ข้อมูลปฏิทินงาน</a></li>
<li><a href="../mod_calendar/index.php" class="manage_page">ข้อมูลนัดหมายงานลูกค้า</a></li>
<li><a href="../mod_calendar/index2.php" class="manage_page">ข้อมูลติดตามงานลูกค้า</a></li>
<li><a href="../mod_calendar/index3.php" class="manage_page">ข้อมูลอื่นๆ</a></li>
<li><a href="../mod_calendar/today.php" class="folder">ปฏิทินงานวันนี้</a></li>
</ul>
</li>
<li>
<h3><a href="#" class="user">ข้อมูลการติดต่อลูกค้า</a></h3>
<ul>
<li><a href="../mod_track/index.php" class="useradd">ข้อมูลติดต่อลูกค้า</a></li>
</ul>
</li>
<li>
<h3><a href="#" class="user">ข้อมูลส่วนตัว</a></h3>
<ul>
<li><a href="index.php" class="useradd">ข้อมูลติดต่อลูกค้าของฉัน </a></li>
</ul>
<ul>
<li><a href="index2.php" class="useradd">ข้อมูลรับเรื่องแทน</a></li>
</ul>
</li>
<li>
<ul>
<li></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</body>
<!-- InstanceEnd --></html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox