Current Path : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/CP/ |
Windows NT SG2NWVPWEB022 10.0 build 17763 (Windows Server 2016) i586 |
Current File : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/CP/CPMasterPhotoGallery.php |
<?php require_once('CPAuth.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/CPMasterPage.dwt" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>City Managers' Association Madhya Pradesh - Photo Gallery</title> <!-- InstanceEndEditable --> <link href="CP.css" rel="stylesheet" type="text/css" /> <!-- InstanceBeginEditable name="head" --> <style type="text/css"> <!-- --> </style> <!-- InstanceEndEditable --> </head> <body bgcolor="#999999"> <div align="center"> <table border="0" cellpadding="0px" cellspacing="0" width="100%"> <tbody> <tr> <td bgcolor="#2D8FC0" style="padding:5px; border:double"" colspan="3"> <div class="BannerStyle"> <div class="BannerStyle">City Managers' Association, Madhya Pradesh</div> </div> </td> </tr> <tr> <td bgcolor="#2D8FC0" width="33%" style="border:double"> <div style="text-align: left;"> <?php echo "Welcome : " . $_SESSION['SESS_FIRST_NAME'] . " " . $_SESSION['SESS_LAST_NAME'];?> </div> </td> <td bgcolor="#2D8FC0" width="33%" style="border:double"> <div style="text-align: center;"> <?php echo "Today : " . date("l, d-M-Y"); ?> </div> </td> <td bgcolor="#2D8FC0" width="33%" style="border:double"> <div style="text-align: right;"> <a href="CPLogout.php">Logout </a> </div> </td> </tr> <tr> <td bgcolor="#999999" height="10px" colspan="3"> </td> </tr> <tr> <td align="center" bgcolor="#2D8FC0" colspan="3" style="border:double"> <table border="0" cellpadding="0" cellspacing="0" style="padding-bottom:3px"> <tr> <td> <a href="CPHome.php">Home </a> | </td> <td> <a href="CPMasterProject.php"> Projects </a> | </td> <td> <a href="CPMasterPublication.php"> Publications </a> | </td> <td> <a href="CPMasterTender.php"> Tenders </a> | </td> <td> <a href="CPMasterRecruitment.php"> Recruitments </a> | </td> <td> <a href="CPMasterNews.php"> News </a> | </td> <td> <a href="CPMasterDownload.php"> Download </a> | </td> <td> <a href="CPMasterWhatsNew.php"> What's New </a> | </td> <td> <a href="CPMasterMembership.php"> Membership </a> | </td> <td> <a href="CPMasterTeamMember.php"> Team </a> | </td> <td> <a href="CPContactUs.php"> Contact Us </a> | </td> <td> <a href="CPMasterPhotoGallery.php"> Gallery</a> | </td> <td> <a href="CPFeedbackView.php"> Feedback</a> </td> </tr> </table> </td> </tr> <tr> <td bgcolor="#999999" height="10px" colspan="3"> </td> </tr> <tr> <td align="center" bgcolor="#2D8FC0" colspan="3" style="border:double"> <!-- InstanceBeginEditable name="CPMasterPageEdit" --> <div style="text-align: center;"> <table width="100%" cellpadding="5px" cellspacing="10px" > <tr> <td colspan="3" class="StyleTableHeader" style="background-color:#FFFFFF;"> Photo Gallery </td> </tr> <tr> <td valign="top"width="20%" style="background-color:#FFFFFF"> Gallery </td> <td valign="top" width="50%" style="background-color:#FFFFFF"> Add/Edit Album </td> <td valign="top"width="30%" style="background-color:#FFFFFF"> Add/Edit Image </td> </tr> <tr> <td valign="top" width="20%" style="background-color:#FFFFFF"> <?php require_once('CPConfig.php'); $link = mysql_connect($hostname, $username, $password) ; $db= mysql_select_db($dbname); $ZeroRecord = 'No'; $page_name="CPMasterPhotoGallery.php"; @$column_name='PGName'; if (empty($_GET['start'])) { $start = 0; } else { $start = $_GET['start']; } if (isset($_GET['PGID'])) { $PGID = $_GET['PGID']; } else { $PGID = '-1'; } if (isset($_GET['mMode'])) { $mMode = $_GET['mMode']; } else { $mMode = ''; } $eu = ($start - 0); $limit = 10; $this1 = $eu + $limit; $back = $eu - $limit; $next = $eu + $limit; $query2=" SELECT * FROM masterphotogallery "; $result2=mysql_query($query2); echo mysql_error(); $nume=mysql_num_rows($result2); $bgcolor="#ffffff"; echo "<TABLE width=99% cellpadding=0 cellspacing=0 style='border:double'>"; $query=" SELECT * FROM masterphotogallery "; if(isset($column_name) and strlen($column_name)>0){ $query = $query . " order by $column_name"; } $query = $query . " limit $eu, $limit "; $result=mysql_query($query); if(mysql_num_rows($result) == 0) { if ($eu == 0) { $ZeroRecord = 'Yes'; } else $eu = $eu - $limit; $query="SELECT * FROM masterphotogallery order by $column_name limit $eu, $limit"; $result=mysql_query($query); } echo mysql_error(); while($noticia = mysql_fetch_array($result)) { if($bgcolor=='#f1f1f1') { $bgcolor='#ffffff'; } else { $bgcolor='#f1f1f1'; } if ($PGID=='-1') { echo "<tr><td bgcolor=$bgcolor class='StyleSelectedCell'>"; } else if ($PGID==$noticia['PGID']) { echo "<tr><td bgcolor=$bgcolor class='StyleSelectedCell'>"; } else { echo "<td valign='top' bgcolor=$bgcolor>"; } echo "<a href='../CP/CPMasterPhotoGallery.php?start=$eu&PGID=$noticia[PGID]'>$noticia[PGName]</a></td></tr>"; if ($PGID=='-1') { $PGID = $noticia['PGID']; } } echo "</table>"; echo "<table align = 'center' width='99%' style='background-color:#333333'><tr><td align='left' width='20%'>"; if($back >=0) { print "<a href='$page_name?start=$back' class='aPage'>PREV</a>"; } echo "</td><td align=center width='58%'>"; $i=0; $l=1; for($i=0;$i < $nume;$i=$i+$limit){ if($i <> $eu){ echo "<a href='$page_name?start=$i' class='aPage'>$l</a> "; } else { echo "<font class='FontPageSelected'>$l</font>";} $l=$l+1; } echo "</td><td align='right' width='20%'>"; if($this1 < $nume) { print "<a href='$page_name?start=$next' class='aPage'>NEXT</a>";} echo "</td></tr></table>"; ?> </td> <td valign="top" width="50%" style="background-color:#FFFFFF"> <form id="FrmPG" name="FrmPG" method="post" action="CPMasterPhotoGallery-Exec.php<?php echo "?start=$eu&PGID=$PGID&mMode=$mMode"; ?> " enctype="multipart/form-data"> <?php $qry="SELECT * FROM masterphotogallery WHERE PGID='$PGID'"; $result=mysql_query($qry); if($result) { if(mysql_num_rows($result) == 1) { $member = mysql_fetch_assoc($result); } } ?> <table border="0" cellpadding="0" cellspacing="0" width="100%" style="text-align:center;"> <tbody> <tr> <td class="StyleTableBodyRight"> Name : </td> <td class="StyleTableBodyLeft"> <?php echo "<input type='text' name='TxtPGName' id='TxtPGName' size='54' tabindex='300' "; if (isset($_GET['mError'])) { echo "Value='" . $_SESSION['mPGName'] . "'/>"; echo "<font color='#FF0000'> * " . $_GET['mError'] . "</font>"; } else { if ($mMode == "Add") { echo "Value=''/>"; } else if ($mMode == "Modify") { echo "Value='" . $member['PGName'] . "'/>"; } else { if ($ZeroRecord == 'Yes') { echo "Value='' disabled = 'true'/>"; } else { echo "Value='" . $member['PGName'] . "' disabled = 'true'/>"; } } } ?> </td> </tr> <tr> <td class="StyleTableBodyRight"> Description : </td> <td class="StyleTableBodyLeft"> <?php echo "<textarea name='TxtPGDescription' id='TxtPGDescription' cols='42' rows='15' tabindex='301' "; if ($mMode == "Add") { } else if ($mMode == "Modify") { } else { echo "disabled='true'"; } echo ">"; if (isset($_GET['mError'])) { echo $_SESSION['mPGDescription'] . "</textarea>"; } else { if ($mMode == "Add") { echo "</textarea>"; } else if ($mMode == "Modify") { echo $member['PGDescription'] . "</textarea>"; } else { if ($ZeroRecord == 'Yes') { echo "</textarea>"; } else { echo $member['PGDescription'] . "</textarea>"; } } } ?> </td> </tr> <tr> <td class="StyleTableBodyRight"> Remarks : </td> <td class="StyleTableBodyLeft"> <?php echo "<input type='text' name='TxtPGRemarks' id='TxtPGRemarks' size='54' tabindex='302' "; if (isset($_GET['mError'])) { echo "Value='" . $_SESSION['mPGRemarks'] . "'/>"; } else { if ($mMode == "Add") { echo "Value=''/>"; } else if ($mMode == "Modify") { echo "Value='" . $member['PGRemarks'] . "'/>"; } else { if ($ZeroRecord == 'Yes') { echo "Value='' disabled = 'true'/>"; } else { echo "Value='" . $member['PGRemarks'] . "' disabled = 'true'/>"; } } } //Album Directory echo "<input type='hidden' name='TxtPGDir' id='TxtPGDir' size='54' tabindex='302' "; if ($ZeroRecord == 'Yes') { $PGDir = ''; } else { $PGDir = $member['PGDir']; } if (isset($_GET['mError'])) { echo "Value=''/>"; } else { if ($mMode == "Add") { echo "Value=''/>"; } else if ($mMode == "Modify") { echo "Value='" . $member['PGDir'] . "'/>"; } else { if ($ZeroRecord == 'Yes') { echo "Value='' disabled = 'true'/>"; } else { echo "Value='" . $member['PGDir'] . "' disabled = 'true'/>"; } } } ?> </td> </tr> <tr> <td class="StyleTableBodyRight"> Image : </td> <td class="StyleTableBodyLeft"> <input name="PGImagePath" type="file" size="41" tabindex="303" <?php if ($mMode == "Add") { } else if ($mMode == "Modify") { } else { echo "disabled='true'"; } ?> /> <?php if ($ZeroRecord == 'Yes') { } else { if ($mMode != "Add") echo "<br />$member[PGImageName]"; } ?> </td> </tr> <tr> <td> </td> <td align="left"> <INPUT type="submit" value="Add" name="BtnAdd" tabindex="310" class="button-PG" <?php if ($mMode == "Add") { echo "disabled = 'true' "; } else if ($mMode == "Modify") { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Modify" name="BtnModify" tabindex="311" class="button-PG" <?php if ($mMode == "Add") { echo "disabled = 'true' "; } else if ($mMode == "Modify") { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Save" name="BtnSave" tabindex="312" class="button-PG" <?php if ($mMode == "Add") { } else if ($mMode == "Modify") { } else { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Cancel" name="BtnCancel" tabindex="313" class="button-PG" <?php if ($mMode == "Add") { } else if ($mMode == "Modify") { } else { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Delete" name="BtnDelete" tabindex="314" class="button-PG" <?php if ($mMode == "Add") { echo "disabled = 'true' "; } else if ($mMode == "Modify") { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Clear" name="BtnClear" tabindex="315" class="button-PG" <?php if ($mMode == "Add") { } else if ($mMode == "Modify") { } else { echo "disabled = 'true' "; } ?> /> </td> </tr> </tbody> </table> </form> </td> <td valign="top"width="30%" style="background-color:#FFFFFF"> <?php $ZeroRecordD = 'No'; $page_nameD = "CPMasterPhotoGallery.php"; @$column_nameD = 'PGDName'; if (empty($_GET['startD'])) { $startD = 0; } else { $startD = $_GET['startD']; } if (isset($_GET['PGDID'])) { $PGDID = $_GET['PGDID']; } else { $PGDID = '-1'; } if (isset($_GET['mModeD'])) { $mModeD = $_GET['mModeD']; } else { $mModeD = ''; } $euD = ($startD - 0); $limitD = 6; $this1D = $euD + $limitD; $backD = $euD - $limitD; $nextD = $euD + $limitD; $qryPGID = '-1'; if ($mMode == 'Add') { } else { $qryPGID = $PGID; } $query2D=" SELECT * FROM detailphotogallery WHERE PGID = '$qryPGID'"; $result2D=mysql_query($query2D); echo mysql_error(); $numeD=mysql_num_rows($result2D); $bgcolor="#ffffff"; echo "<TABLE width=99% cellpadding=0 cellspacing=0 style='border:double'>"; $queryD=" SELECT * FROM detailphotogallery WHERE PGID = '$qryPGID'"; if(isset($column_nameD) and strlen($column_nameD)>0){ $queryD = $queryD . " order by $column_nameD"; } $queryD = $queryD . " limit $euD, $limitD "; $resultD=mysql_query($queryD); if(mysql_num_rows($resultD) == 0) { if ($euD == 0) { $ZeroRecordD = 'Yes'; } else $euD = $euD - $limitD; $queryD="SELECT * FROM detailphotogallery WHERE PGID = '$qryPGID' order by $column_nameD limit $euD, $limitD"; $resultD=mysql_query($queryD); } echo mysql_error(); $iTR = 0; while($noticiaD = mysql_fetch_array($resultD)) { if ($iTR%3 == 0) { if ($iTR != 0) echo "</tr >"; echo "<tr >"; } if ($PGDID=='-1') { echo "<td class='StyleSelectedCell'>"; } else if ($PGDID==$noticiaD['PGDID']) { echo "<td class='StyleSelectedCell'>"; } else { echo "<td valign='top'>"; } echo "<a href='../CP/CPMasterPhotoGallery.php?start=$eu&PGID=$PGID&startD=$euD&PGDID=$noticiaD[PGDID]'><img src='../CP/$noticiaD[PGDImagePath]Thumbs/$noticiaD[PGDImageName]' alt='' width='72' /><br />$noticiaD[PGDName]</a></td>"; if ($PGDID=='-1') { $PGDID = $noticiaD['PGDID']; } $iTR = $iTR + 1; } echo "</tr ></table>"; echo "<table align = 'center' width='99%' style='background-color:#333333'><tr><td align='left' width='20%'>"; if($backD >=0) { print "<a href='$page_nameD?start=$back&PGID=$PGID&startD=$backD' class='aPage'>PREV</a>"; } echo "</td><td align=center width='58%'>"; $iD=0; $lD=1; for($iD=0;$iD < $numeD;$iD=$iD+$limitD){ if($iD <> $euD){ echo "<a href='$page_nameD?start=$i&PGID=$PGID&startD=$iD' class='aPage'>$lD</a> "; } else { echo "<font class='FontPageSelected'>$lD</font>";} $lD=$lD+1; } echo "</td><td align='right' width='20%'>"; if($this1 < $nume) { print "<a href='$page_name?start=$next&PGID=$PGID&startD=$nextD' class='aPage'>NEXT</a>";} echo "</td></tr></table>"; ?> <form id="FrmPGD" name="FrmPGD" method="post" action="CPMasterPhotoGallery-Exec.php<?php echo "?start=$eu&PGID=$PGID&mMode=$mMode&startD=$euD&PGDID=$PGDID&mModeD=$mModeD"; ?> " enctype="multipart/form-data"> <?php $qryD="SELECT * FROM detailphotogallery WHERE PGDID='$PGDID'"; $resultD=mysql_query($qryD); if($resultD) { if(mysql_num_rows($resultD) == 1) { $memberD = mysql_fetch_assoc($resultD); } } ?> <table border="0" cellpadding="0" cellspacing="0" width="100%" style="text-align:center;"> <tbody> <tr> <td class="StyleTableBodyRight"> Name : </td> <td class="StyleTableBodyLeft"> <?php echo "<input type='text' name='TxtPGDName' id='TxtPGDName' size='30' tabindex='400' "; if (isset($_GET['mErrorD'])) { echo "Value='" . $_SESSION['mPGDName'] . "'/>"; } else { if ($mModeD == "Add") { echo "Value=''/>"; } else if ($mModeD == "Modify") { echo "Value='" . $memberD['PGDName'] . "'/>"; } else { if ($ZeroRecordD == 'Yes') { echo "Value='' disabled = 'true'/>"; } else { echo "Value='" . $memberD['PGDName'] . "' disabled = 'true'/>"; } } } ?> </td> </tr> <tr> <td class="StyleTableBodyRight"> Description : </td> <td class="StyleTableBodyLeft"> <?php echo "<textarea name='TxtPGDDescription' id='TxtPGDDescription' cols='24' rows='5' tabindex='401' "; if ($mModeD == "Add") { } else if ($mModeD == "Modify") { } else { echo "disabled='true'"; } echo ">"; if (isset($_GET['mErrorD'])) { echo $_SESSION['mPGDDescription'] . "</textarea>"; } else { if ($mModeD == "Add") { echo "</textarea>"; } else if ($mModeD == "Modify") { echo $memberD['PGDDescription'] . "</textarea>"; } else { if ($ZeroRecordD == 'Yes') { echo "</textarea>"; } else { echo $memberD['PGDDescription'] . "</textarea>"; } } } ?> </td> </tr> <tr> <td class="StyleTableBodyRight"> Remarks : </td> <td class="StyleTableBodyLeft"> <?php echo "<input type='text' name='TxtPGDRemarks' id='TxtPGDRemarks' size='30' tabindex='402' "; if (isset($_GET['mErrorD'])) { echo "Value='" . $_SESSION['mPGDRemarks'] . "'/>"; } else { if ($mModeD == "Add") { echo "Value=''/>"; } else if ($mModeD == "Modify") { echo "Value='" . $memberD['PGDRemarks'] . "'/>"; } else { if ($ZeroRecordD == 'Yes') { echo "Value='' disabled = 'true'/>"; } else { echo "Value='" . $memberD['PGDRemarks'] . "' disabled = 'true'/>"; } } } //Album Directory echo "<input type='hidden' name='TxtPGDDir' id='TxtPGDDir' size='30' tabindex='302' Value='$PGDir' />"; ?> </td> </tr> <tr> <td class="StyleTableBodyRight"> Image : </td> <td class="StyleTableBodyLeft"> <input name="PGDImagePath" type="file" size="17" tabindex="403" <?php if ($mModeD == "Add") { } else if ($mModeD == "Modify") { } else { echo "disabled='true'"; } ?> /> <?php if (isset($_GET['mErrorD'])) { echo "<br /><font color='#FF0000'> * " . $_GET['mErrorD'] . "</font>"; } else if ($ZeroRecordD == 'Yes') { } else { if ($mModeD != "Add") echo "<br />$memberD[PGDImageName]"; } ?> </td> </tr> <tr> <td> </td> <td align="left"> <INPUT type="submit" value="Add" name="BtnDAdd" tabindex="410" class="button-PGD" <?php if ($mModeD == "Add") { echo "disabled = 'true' "; } else if ($mModeD == "Modify") { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Modify" name="BtnDModify" tabindex="411" class="button-PGD" <?php if ($mModeD == "Add") { echo "disabled = 'true' "; } else if ($mModeD == "Modify") { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Save" name="BtnDSave" tabindex="412" class="button-PGD" <?php if ($mModeD == "Add") { } else if ($mModeD == "Modify") { } else { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Cancel" name="BtnDCancel" tabindex="413" class="button-PGD" <?php if ($mModeD == "Add") { } else if ($mModeD == "Modify") { } else { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Delete" name="BtnDDelete" tabindex="414" class="button-PGD" <?php if ($mModeD == "Add") { echo "disabled = 'true' "; } else if ($mModeD == "Modify") { echo "disabled = 'true' "; } ?> /> <INPUT type="submit" value="Clear" name="BtnDClear" tabindex="415" class="button-PGD" <?php if ($mModeD == "Add") { } else if ($mModeD == "Modify") { } else { echo "disabled = 'true' "; } ?> /> </td> </tr> </tbody> </table> </form> </td> </tr> </table> </div> <!-- InstanceEndEditable --></td> </tr> <tr> <td bgcolor="#999999" height="10px" colspan="3"> </td> </tr> <tr> <td align="center" bgcolor="#2D8FC0" colspan="3" style="border:double"> <span>©2009 City Managers' Association, Madhya Pradesh</span> </td> </tr> </tbody></table> </div> </body> <!-- InstanceEnd --></html>