فهرست منبع

Show Admin Link Always

own3mall 9 سال پیش
والد
کامیت
fd7e7434c6
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      modules/cron/user_cron.php

+ 3 - 1
modules/cron/user_cron.php

@@ -161,12 +161,14 @@ function exec_ogp_module()
 {
 	global $db;
 	$isAdmin = $db->isAdmin($_SESSION['user_id']);
+	$boolShowedAdminLink = false;
 
 	$homes = $db->getIpPortsForUser($_SESSION['user_id']);
 	if(!$homes)
 	{
 		print_failure(get_lang('cron_no_servers_tied_to_account'));
 		if($isAdmin){
+			$boolShowedAdminLink = true;
 			echo '<a href="home.php?m=cron&p=cron">' . get_lang('cron_admin_link_display_text') . '</a>';
 		}
 		return 0;
@@ -424,7 +426,7 @@ function exec_ogp_module()
 	else
 		echo "<h3>". there_are_no_scheduled_jobs ."</h3>";
 ?>
-<table class='center' ><tr><td><a href='?m=administration&p=main' > << <?php echo back ?></a></td></tr></table>
+<table class='center' ><tr><td><a href='?m=administration&p=main' > << <?php echo back ?></a><?php if(!$boolShowedAdminLink){ echo '&nbsp; &nbsp; | &nbsp; &nbsp; ' . '<a href="home.php?m=cron&p=cron">' . get_lang('cron_admin_link_display_text') . '</a>'; }?></td></tr></table>
 <script type="text/javascript">
 $(document).ready(function() 
 	{