Bladeren bron

Use Get Lang

own3mall 8 jaren geleden
bovenliggende
commit
db14ff9944
4 gewijzigde bestanden met toevoegingen van 49 en 49 verwijderingen
  1. 26 26
      modules/cron/cron.php
  2. 1 1
      modules/cron/events.php
  3. 2 2
      modules/cron/thetime.php
  4. 20 20
      modules/cron/user_cron.php

+ 26 - 26
modules/cron/cron.php

@@ -161,7 +161,7 @@ function exec_ogp_module()
 	$r_server_id = $homeid_ip_port == 0 ? $_POST['r_server_id'] : $server_homes[$homeid_ip_port]['remote_server_id'];
 	$r_server_id = $homeid_ip_port == 0 ? $_POST['r_server_id'] : $server_homes[$homeid_ip_port]['remote_server_id'];
 	$homeid_ip_port = $homeid_ip_port == 0 ? key($server_homes) : $homeid_ip_port;
 	$homeid_ip_port = $homeid_ip_port == 0 ? key($server_homes) : $homeid_ip_port;
 	$curtime = $refresh->add( "home.php?m=cron&p=thetime&r_server_id=$r_server_id&type=cleared" );
 	$curtime = $refresh->add( "home.php?m=cron&p=thetime&r_server_id=$r_server_id&type=cleared" );
-	echo "<pre class='log' ><table><tr><td>" . now . 
+	echo "<pre class='log' ><table><tr><td>" . get_lang("now") . 
 		 "&nbsp;</td><td><form action='' method='POST' >" . get_server_selector($server_homes, $homeid_ip_port, TRUE, true) . 
 		 "&nbsp;</td><td><form action='' method='POST' >" . get_server_selector($server_homes, $homeid_ip_port, TRUE, true) . 
 		 "</form></td><td><form action='' method='POST' >" .
 		 "</form></td><td><form action='' method='POST' >" .
 		 get_remote_server_selector($remote_servers, $remote_servers_offline, $r_server_id, TRUE) .
 		 get_remote_server_selector($remote_servers, $remote_servers_offline, $r_server_id, TRUE) .
@@ -170,25 +170,25 @@ function exec_ogp_module()
 <table class="center hundred">
 <table class="center hundred">
 	<tr>
 	<tr>
 		<th>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo action; ?>
+		<?php echo get_lang("action"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo user_games; ?>
+		<?php echo get_lang("user_games"); ?>
 		</th>
 		</th>
 	</tr>
 	</tr>
 	<tr>
 	<tr>
@@ -221,25 +221,25 @@ function exec_ogp_module()
 	</tr>
 	</tr>
 	<tr>
 	<tr>
 		<th>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo server; ?>
+		<?php echo get_lang("server"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo command; ?>
+		<?php echo get_lang("command"); ?>
 		</th>
 		</th>
 	</tr>
 	</tr>
 	<tr>
 	<tr>
@@ -272,7 +272,7 @@ function exec_ogp_module()
 	</tr>
 	</tr>
 </table>
 </table>
 <br>
 <br>
-<h2><?php echo scheduled_jobs;?></h2>
+<h2><?php echo get_lang("scheduled_jobs");?></h2>
 <?php
 <?php
 	if ( !empty($remote_servers_offline) )
 	if ( !empty($remote_servers_offline) )
 	{
 	{
@@ -299,25 +299,25 @@ function exec_ogp_module()
 	</tr>
 	</tr>
 	<tr>
 	<tr>
 		<th>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo action . " / " . server; ?>
+		<?php echo get_lang("action") . " / " . get_lang("server"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo user_games . " / " . command; ?>
+		<?php echo get_lang("user_games") . " / " . get_lang("command"); ?>
 		</th>
 		</th>
 	</tr>
 	</tr>
 <?php
 <?php
@@ -365,8 +365,8 @@ function exec_ogp_module()
 									<td style="width: 132px;">
 									<td style="width: 132px;">
 										<input type="hidden" name="job_id" value=\''.$jobId.'\' />
 										<input type="hidden" name="job_id" value=\''.$jobId.'\' />
 										<input type="hidden" name="r_server_id" value=\''.$remote_server_id.'\' />
 										<input type="hidden" name="r_server_id" value=\''.$remote_server_id.'\' />
-										<input style="" type="submit" name="editJob" value="'. edit .'" />
-										<input style="" type="submit" name="removeJob" value="'. remove .'" />
+										<input style="" type="submit" name="editJob" value="'. get_lang("edit") .'" />
+										<input style="" type="submit" name="removeJob" value="'. get_lang("remove") .'" />
 										</form>
 										</form>
 									</td>
 									</td>
 								</tr>';
 								</tr>';
@@ -379,7 +379,7 @@ function exec_ogp_module()
 	}
 	}
 	else
 	else
 	{
 	{
-		echo "<h3>". there_are_no_scheduled_jobs ."</h3>";
+		echo "<h3>". get_lang("there_are_no_scheduled_jobs") ."</h3>";
 	}
 	}
 ?>
 ?>
 <table class='center hundred' ><tr><td><a href='javascript:history.go(-1)' > << <?php echo back ?></a></td></tr></table>
 <table class='center hundred' ><tr><td><a href='javascript:history.go(-1)' > << <?php echo back ?></a></td></tr></table>

+ 1 - 1
modules/cron/events.php

@@ -37,7 +37,7 @@ function exec_ogp_module()
 		$remote = new OGPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout'] );
 		$remote = new OGPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout'] );
 		if($remote->status_chk() != 1)
 		if($remote->status_chk() != 1)
 		{
 		{
-			print_failure(agent_offline);
+			print_failure(get_lang("agent_offline"));
 			return;
 			return;
 		}
 		}
 		$remote->remote_readfile('scheduler.log', $events);
 		$remote->remote_readfile('scheduler.log', $events);

+ 2 - 2
modules/cron/thetime.php

@@ -43,6 +43,6 @@ function exec_ogp_module()
 			 '</td></tr></table>';
 			 '</td></tr></table>';
 	}
 	}
 	else
 	else
-		echo agent_offline;
+		echo get_lang("agent_offline");
 }
 }
-?>
+?>

+ 20 - 20
modules/cron/user_cron.php

@@ -143,13 +143,13 @@ function exec_ogp_module()
 		list($jobsArray, $remote_servers_offline) = reloadJobs($server_homes, $remote_servers);
 		list($jobsArray, $remote_servers_offline) = reloadJobs($server_homes, $remote_servers);
 	}	
 	}	
 
 
-	echo "<h2>" . schedule_new_job . "</h2>";
+	echo "<h2>" . get_lang("schedule_new_job") . "</h2>";
 	require_once("includes/refreshed.php");
 	require_once("includes/refreshed.php");
 	$refresh = new refreshed();
 	$refresh = new refreshed();
 	$homeid_ip_port = isset($_POST['homeid_ip_port']) ? $_POST['homeid_ip_port'] : key($server_homes);
 	$homeid_ip_port = isset($_POST['homeid_ip_port']) ? $_POST['homeid_ip_port'] : key($server_homes);
 	$r_server_id = $server_homes[$homeid_ip_port]['remote_server_id'];
 	$r_server_id = $server_homes[$homeid_ip_port]['remote_server_id'];
 	$curtime = $refresh->add( "home.php?m=cron&p=thetime&r_server_id=$r_server_id&type=cleared" );
 	$curtime = $refresh->add( "home.php?m=cron&p=thetime&r_server_id=$r_server_id&type=cleared" );
-	echo "<pre class='log' ><table><tr><td>" . now . 
+	echo "<pre class='log' ><table><tr><td>" . get_lang("now") . 
 		"&nbsp;</td><td><form action='' method='POST' >" . get_server_selector($server_homes, $homeid_ip_port, TRUE) . 
 		"&nbsp;</td><td><form action='' method='POST' >" . get_server_selector($server_homes, $homeid_ip_port, TRUE) . 
 		"</form></td></tr></table> <b style='font-size:1.4em;'>" . $refresh->getdiv($curtime) . "</b></pre>";
 		"</form></td></tr></table> <b style='font-size:1.4em;'>" . $refresh->getdiv($curtime) . "</b></pre>";
  ?>
  ?>
@@ -157,25 +157,25 @@ function exec_ogp_module()
 <table class="center hundred">
 <table class="center hundred">
 	<tr>
 	<tr>
 		<th>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo action; ?>
+		<?php echo get_lang("action"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo user_games; ?>
+		<?php echo get_lang("user_games"); ?>
 		</th>
 		</th>
 	</tr>
 	</tr>
 	<tr>
 	<tr>
@@ -207,7 +207,7 @@ function exec_ogp_module()
 </table>
 </table>
 </form>
 </form>
 <br>
 <br>
-<h2><?php echo scheduled_jobs;?></h2>
+<h2><?php echo get_lang("scheduled_jobs");?></h2>
 <?php
 <?php
 	if ( !empty($jobsArray) )
 	if ( !empty($jobsArray) )
 	{
 	{
@@ -216,25 +216,25 @@ function exec_ogp_module()
 	</tr>
 	</tr>
 	<tr>
 	<tr>
 		<th>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo action; ?>
+		<?php echo get_lang("action"); ?>
 		</th>
 		</th>
 		<th>
 		<th>
-		<?php echo user_games; ?>
+		<?php echo get_lang("user_games"); ?>
 		</th>
 		</th>
 	</tr>
 	</tr>
 <?php
 <?php
@@ -276,8 +276,8 @@ function exec_ogp_module()
 										<td style="width: 132px;">
 										<td style="width: 132px;">
 											<input type="hidden" name="job_id" value=\''.$jobId.'\' />
 											<input type="hidden" name="job_id" value=\''.$jobId.'\' />
 											<input type="hidden" name="r_server_id" value=\''.$remote_server_id.'\' />
 											<input type="hidden" name="r_server_id" value=\''.$remote_server_id.'\' />
-											<input style="" type="submit" name="editJob" value="'. edit .'" />
-											<input style="" type="submit" name="removeJob" value="'. remove .'" />
+											<input style="" type="submit" name="editJob" value="'. get_lang("edit") .'" />
+											<input style="" type="submit" name="removeJob" value="'. get_lang("remove") .'" />
 											</form>
 											</form>
 										</td>
 										</td>
 									</tr>';
 									</tr>';
@@ -291,7 +291,7 @@ function exec_ogp_module()
 <?php
 <?php
 	}
 	}
 	else
 	else
-		echo "<h3>". there_are_no_scheduled_jobs ."</h3>";
+		echo "<h3>". get_lang("there_are_no_scheduled_jobs") ."</h3>";
 ?>
 ?>
 <table class='center hundred' ><tr><td><a href='javascript:history.go(-1)' > << <?php echo back ?></a><?php if(!$boolShowedAdminLink && $isAdmin){ echo '&nbsp; &nbsp; | &nbsp; &nbsp; ' . '<a href="home.php?m=cron&p=cron">' . get_lang('cron_admin_link_display_text') . '</a>'; }?></td></tr></table>
 <table class='center hundred' ><tr><td><a href='javascript:history.go(-1)' > << <?php echo back ?></a><?php if(!$boolShowedAdminLink && $isAdmin){ 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">
 <script type="text/javascript">