<?php

	// include files
	require_once('php/config.php');
	require_once('php/db.php');
	require_once('php/login.php');
	require_once('php/info.php');
	require_once('php/status.php');
	require_once('fckeditor.php') ;
	//

	// info
	$msg = "";
	$page_name = "info";
	// update change
	if(@$MM_update == "form1" && @$eventb == "change" && @$id != "")
	{
		//
		mysql_query("UPDATE $page_name SET list_number = '$a4', text1 = '$t1', text2 = '$t2', hidden_status = '$a3' WHERE id = '$id'");
		$msg = "Updated<br>";
	}
	// query
	if(@$id != "")
	{
		$result = mysql_query("SELECT * FROM $page_name WHERE id = '$id'", $db);
		if(@$myrow = mysql_fetch_array($result))
		{
			// info
			$ln = $myrow['list_number'];
		}
	}
	//
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo($admin_title);?></title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<script src="script.js" language="javascript"></script>
<script src="calc/calendar.js" language="javascript"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="18%" valign="top" style="padding:10px;"><?php include('menu.php'); ?></td>
    <td width="82%" valign="top" style="padding: 10px;">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top" class="adm_ct"><p>&nbsp;</p>
          <form action="<?php echo($_SERVER['REQUEST_URI']); ?>" method="post" enctype="multipart/form-data" name="form1" id="form1">
			<table width="100%" border="0" cellpadding="0" cellspacing="10">
				<tr>
					<td width="15%" valign="top" align="right"><strong>Info Page <?php if(@$id != ""){echo('(ID - '.@$id.')');}?></strong></td>
					<td width="2%" valign="top"><strong>&nbsp;</strong></td>
					<td width="83%" valign="top"><strong><?php echo(@$msg.' '.$cur_full_date);?></strong></td>
				</tr>
			  <?php
				//
				for($i=1;$i<=count($info["lang"]);$i++)
				{
					if($info["lang"][$i] == 1)
					{
						echo('<tr>'."\n");
							echo('<td width="15%" valign="top" align="right">Text ('.$info["langname"][$i].')</td>'."\n");
							echo('<td width="2%" valign="top">&nbsp;</td>'."\n");
							echo('<td width="83%" valign="top"><textarea cols="120" rows="5" name="t'.$i.'" style="font-family:'.$info["langfont"][$i].'">'.@$myrow['text'.$i].'</textarea>');
							if($i == 1)
							{
								echo('&nbsp&nbsp<a href="javascript:gadaikvane(document.form1.t1, document.form1.t1, met[0], met[2], 0);" class="t2">Georgian</a>');
							}
							echo('</td>'."\n");
						echo('</tr>'."\n");
					}
				}
				//
				echo('<tr>'."\n");
					echo('<td width="15%" valign="top" align="right">Lock / Unlock</td>'."\n");
					echo('<td width="2%" valign="top">&nbsp;</td>'."\n");
					echo('<td width="83%" valign="top">');
					echo('<select name="a3">');
					@$cinfo = @$myrow['hidden_status']; 
					include('php/sel_status.php');
					echo('</select>');
					echo('</td>'."\n");
				echo('</tr>'."\n");
				//
				echo('<tr>'."\n");
					echo('<td width="15%" valign="top" align="right">List Number</td>'."\n");
					echo('<td width="2%" valign="top">&nbsp;</td>'."\n");
					echo('<td width="83%" valign="top">');
					echo('<select name="a4">');
					$cinfo = @$ln;
					include('php/sel_list.php');
					echo('</select>');
					echo('</td>'."\n");
				echo('</tr>'."\n");
				//
				echo('<tr>'."\n");
					echo('<td width="15%" valign="top" align="right">&nbsp;</td>'."\n");
					echo('<td width="2%" valign="top">&nbsp;</td>'."\n");
					echo('<td width="83%" valign="top"><input type="button" value="Change" class="but1" onclick="func_edit_info();" /></td>'."\n");
				echo('</tr>'."\n");
				// 
			  ?>
            </table>
            <input type="hidden" name="MM_update" value="form1" />         
            <input type="hidden" name="id" value="<?php echo(@$id); ?>" />
			<input type="hidden" name="eventb" value="<?php echo(@$eventb); ?>" />
          </form>
          <p>&nbsp;</p>
		  </td>
      </tr>
    </table>
	</td>
  </tr>
</table>
</body>
</html>
