index.php
changeset 2 9a485c41cfcf
parent 1 58094faf794d
child 3 64525a2eb098
equal deleted inserted replaced
1:58094faf794d 2:9a485c41cfcf
   106 
   106 
   107 <P FONT CLASS="nav">
   107 <P FONT CLASS="nav">
   108 <?
   108 <?
   109 if (level(10))
   109 if (level(10))
   110 {
   110 {
   111 	?><A HREF="users.php">User Admin</A> <A HREF="seq_update.php">Synchronize Database</A><?
   111 	?><A HREF="users.php"><? echo _('User Admin'); ?></A> <A HREF="seq_update.php"><? echo _('Synchronize Database'); ?></A><?
   112 }
   112 }
   113 ?>
   113 ?>
   114  <A HREF="search.php">Search records</A>
   114  <A HREF="search.php"><? echo _('Search records'); ?></A>
   115 </P>
   115 </P>
   116 
   116 
   117 <BR>
   117 <BR>
   118 Welcome, <?= $_SESSION["name"] ?>.
   118 <? echo _('Welcome'); ?>, <?= $_SESSION["name"] ?>.
   119 <BR>
   119 <BR>
   120 
   120 
   121 Your userlevel is: <?= $_SESSION["level"] ?> (<?= leveldescription($_SESSION["level"]) ?>)
   121 <? echo _('Your userlevel is'); ?>: <?= $_SESSION["level"] ?> (<?= leveldescription($_SESSION["level"]) ?>)
   122 <BR><BR>
   122 <BR><BR>
   123 
   123 
   124 <?
   124 <?
   125 if ($error != "")
   125 if ($error != "")
   126 {
   126 {
   127 	?><H3><FONT COLOR="red">Error: <?= $error ?></FONT></H3><?
   127 	?><H3><FONT COLOR="red"><? echo _('Error'); ?>: <?= $error ?></FONT></H3><?
   128 }
   128 }
   129 ?>
   129 ?>
   130 
   130 
   131 <B>Current domains in DNS (click to view or edit):</B>
   131 <B><? echo _('Current domains in DNS (click to view or edit)'); ?>:</B>
   132 <BR>
   132 <BR>
   133 
   133 
   134 <?
   134 <?
   135 $doms = get_domains(0);
   135 $doms = get_domains(0);
   136 $num_domains = count($doms);
   136 $num_domains = count($doms);
   137 echo "<br /><small><b>Number of domains: </b>".$num_domains."<br />";
   137 echo "<br /><small><b><? echo _('Number of domains'); ?>: </b>".$num_domains."<br />";
   138 
   138 
   139 if ($num_domains > ROWAMOUNT) {
   139 if ($num_domains > ROWAMOUNT) {
   140    show_letters(LETTERSTART,$doms);
   140    show_letters(LETTERSTART,$doms);
   141    echo "<br />";
   141    echo "<br />";
   142 }
   142 }
   146 
   146 
   147 ?>
   147 ?>
   148 
   148 
   149 <br />
   149 <br />
   150 <TABLE BORDER="0" CELLSPACING="4">
   150 <TABLE BORDER="0" CELLSPACING="4">
   151 <TR STYLE="font-weight: Bold;"><TD CLASS="tdbg">&nbsp;</TD><TD CLASS="tdbg">Name</TD><TD CLASS="tdbg">Records</TD><TD CLASS="tdbg">Owner</TD></TR>
   151 <TR STYLE="font-weight: Bold;"><TD CLASS="tdbg">&nbsp;</TD><TD CLASS="tdbg"><? echo _('Name'); ?></TD><TD CLASS="tdbg"><? echo _('Records'); ?></TD><TD CLASS="tdbg"><? echo _('Owner'); ?></TD></TR>
   152 <?
   152 <?
   153 
   153 
   154 if ($num_domains < ROWAMOUNT) {
   154 if ($num_domains < ROWAMOUNT) {
   155    $doms = get_domains(0,"all",ROWSTART,ROWAMOUNT);
   155    $doms = get_domains(0,"all",ROWSTART,ROWAMOUNT);
   156 } else {
   156 } else {
   158 }
   158 }
   159 
   159 
   160 // If the user doesnt have any domains print a message saying so
   160 // If the user doesnt have any domains print a message saying so
   161 if ($doms < 0)
   161 if ($doms < 0)
   162 {
   162 {
   163 	?><TR><TD CLASS="tdbg">&nbsp;</TD><TD CLASS="tdbg" COLSPAN="4"><b>No domains in this listing, sorry.</b></FONT></TD></TR><?
   163 	?><TR><TD CLASS="tdbg">&nbsp;</TD><TD CLASS="tdbg" COLSPAN="4"><b><? echo _('No domains in this listing, sorry.'); ?></b></FONT></TD></TR><?
   164 }
   164 }
   165 
   165 
   166 // If he has domains, dump them (duh)
   166 // If he has domains, dump them (duh)
   167 else
   167 else
   168 {
   168 {
   170 	{
   170 	{
   171 		?><TR><TD CLASS="tdbg">
   171 		?><TR><TD CLASS="tdbg">
   172 		<? if (level(5))
   172 		<? if (level(5))
   173 		{
   173 		{
   174 			?>
   174 			?>
   175 			<A HREF="delete_domain.php?id=<?= $c["id"] ?>"><IMG SRC="images/delete.gif" ALT="[ delete zone ]" BORDER="0"></A><?
   175 			<A HREF="delete_domain.php?id=<?= $c["id"] ?>"><IMG SRC="images/delete.gif" ALT="[ <? echo _('delete zone'); ?> ]" BORDER="0"></A><?
   176 		}
   176 		}
   177 		else
   177 		else
   178 		{
   178 		{
   179 			print "&nbsp;";
   179 			print "&nbsp;";
   180 		}
   180 		}
   185 }
   185 }
   186 
   186 
   187 ?>
   187 ?>
   188 </TABLE>
   188 </TABLE>
   189 
   189 
   190 <small>You only administer some records of domains marked with an (*)</small>
   190 <small><? echo _('You only administer some records of domains marked with an (*).'); ?></small>
   191 
   191 
   192 <?
   192 <?
   193 if (level(5))
   193 if (level(5))
   194 {
   194 {
   195 	// Get some data.
   195 	// Get some data.
   196 	$server_types = array("MASTER", "SLAVE", "NATIVE");
   196 	$server_types = array("MASTER", "SLAVE", "NATIVE");
   197 	$users = show_users();
   197 	$users = show_users();
   198 	?>
   198 	?>
   199 	<BR><BR>
   199 	<BR><BR>
   200 	<FORM METHOD="post" ACTION="index.php">
   200 	<FORM METHOD="post" ACTION="index.php">
   201 	<B>Create new domain:</B><BR>
   201 	<B><? echo _('Create new domain'); ?>:</B><BR>
   202 	<TABLE BORDER="0" CELLSPACING="4">
   202 	<TABLE BORDER="0" CELLSPACING="4">
   203 	<TR><TD CLASS="tdbg">Domain name:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="domain" VALUE="<? if ($error) print $_POST["domain"]; ?>"></TD></TR>
   203 	<TR><TD CLASS="tdbg"><? echo _('Domain name'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="domain" VALUE="<? if ($error) print $_POST["domain"]; ?>"></TD></TR>
   204 	<TR><TD CLASS="tdbg">Web IP:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="webip" VALUE="<? if ($error) print $_POST["webip"]; ?>"></TD></TR>
   204 	<TR><TD CLASS="tdbg"><? echo _('Web IP'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="webip" VALUE="<? if ($error) print $_POST["webip"]; ?>"></TD></TR>
   205 	<TR><TD CLASS="tdbg">Mail IP:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="mailip" VALUE="<? if ($error) print $_POST["mailip"]; ?>"></TD></TR>
   205 	<TR><TD CLASS="tdbg"><? echo _('Mail IP'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="mailip" VALUE="<? if ($error) print $_POST["mailip"]; ?>"></TD></TR>
   206 	<TR><TD CLASS="tdbg">Owner:</TD><TD CLASS="tdbg">
   206 	<TR><TD CLASS="tdbg"><? echo _('Owner'); ?>:</TD><TD CLASS="tdbg">
   207 	<SELECT NAME="owner">
   207 	<SELECT NAME="owner">
   208 	<?
   208 	<?
   209 	foreach ($users as $u)
   209 	foreach ($users as $u)
   210 	{
   210 	{
   211         	?><OPTION VALUE="<?= $u['id'] ?>"><?= $u['fullname'] ?></OPTION><?
   211         	?><OPTION VALUE="<?= $u['id'] ?>"><?= $u['fullname'] ?></OPTION><?
   215 	</TD></TR>
   215 	</TD></TR>
   216 	<?
   216 	<?
   217 	if($MASTER_SLAVE_FUNCTIONS == true)
   217 	if($MASTER_SLAVE_FUNCTIONS == true)
   218 	{
   218 	{
   219 	?>
   219 	?>
   220 	<TR><TD CLASS="tdbg">Domain type:</TD><TD CLASS="tdbg">
   220 	<TR><TD CLASS="tdbg"><? echo _('Domain type'); ?>:</TD><TD CLASS="tdbg">
   221 	<SELECT NAME="dom_type">
   221 	<SELECT NAME="dom_type">
   222 	<?
   222 	<?
   223 	foreach($server_types as $s)
   223 	foreach($server_types as $s)
   224 	{
   224 	{
   225 		?><OPTION VALUE="<?=$s?>"><?=$s ?></OPTION><?
   225 		?><OPTION VALUE="<?=$s?>"><?=$s ?></OPTION><?
   226 	}
   226 	}
   227 	?>
   227 	?>
   228 	</SELECT>
   228 	</SELECT>
   229 	</TD></TR>
   229 	</TD></TR>
   230 	<? } ?>
   230 	<? } ?>
   231 	<TR><TD CLASS="tdbg">Create zone without<BR>applying records-template:</TD><TD CLASS="tdbg"><INPUT TYPE="checkbox" NAME="empty" VALUE="1"></TD></TR>
   231 	<TR><TD CLASS="tdbg"><? echo _('Create zone without'); ?><BR><? echo _('applying records-template'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="checkbox" NAME="empty" VALUE="1"></TD></TR>
   232 	<TR><TD CLASS="tdbg">&nbsp;</TD><TD CLASS="tdbg"><INPUT TYPE="submit" CLASS="button" NAME="submit" VALUE="Add domain"></TD></TR>
   232 	<TR><TD CLASS="tdbg">&nbsp;</TD><TD CLASS="tdbg"><INPUT TYPE="submit" CLASS="button" NAME="submit" VALUE="<? echo _('Add domain'); ?>"></TD></TR>
   233 	</TABLE>
   233 	</TABLE>
   234 	</FORM>
   234 	</FORM>
   235 <?
   235 <?
   236 }
   236 }
   237 ?>
   237 ?>
   238 
   238 
   239 <BR><BR>
   239 <BR><BR>
   240 <FORM METHOD="post" ACTION="index.php">
   240 <FORM METHOD="post" ACTION="index.php">
   241 <B>Change your password:</B><BR>
   241 <B><? echo _('Change your password'); ?>:</B><BR>
   242 <TABLE BORDER="0" CELLSPACING="4">
   242 <TABLE BORDER="0" CELLSPACING="4">
   243 <TR><TD CLASS="tdbg">Current password:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="password" CLASS="input" NAME="currentpass" VALUE=""></TD></TR>
   243 <TR><TD CLASS="tdbg"><? echo _('Current password'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="password" CLASS="input" NAME="currentpass" VALUE=""></TD></TR>
   244 <TR><TD CLASS="tdbg">New Password:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="password" CLASS="input" NAME="newpass" VALUE=""></TD></TR>
   244 <TR><TD CLASS="tdbg"><? echo _('New Password'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="password" CLASS="input" NAME="newpass" VALUE=""></TD></TR>
   245 <TR><TD CLASS="tdbg">New Password:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="password" CLASS="input" NAME="newpass2" VALUE=""></TD></TR>
   245 <TR><TD CLASS="tdbg"><? echo _('New Password'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="password" CLASS="input" NAME="newpass2" VALUE=""></TD></TR>
   246 <TR><TD CLASS="tdbg">&nbsp;</TD><TD CLASS="tdbg"><INPUT TYPE="submit" CLASS="button" NAME="passchange" VALUE="Change password"></TD></TR>
   246 <TR><TD CLASS="tdbg">&nbsp;</TD><TD CLASS="tdbg"><INPUT TYPE="submit" CLASS="button" NAME="passchange" VALUE="<? echo _('Change password'); ?>"></TD></TR>
   247 </TABLE>
   247 </TABLE>
   248 </FORM>
   248 </FORM>
   249 <?
   249 <?
   250 include_once("inc/footer.inc.php");
   250 include_once("inc/footer.inc.php");
   251 ?>
   251 ?>