Location: PHPKode > projects > e107_help Plugin > Liveforspeed/admin_config.php
<?php
/*
+---------------------------------------------------------------+
|	e107 website system
|
|	┬ęSteve Dunstan 2001-2002
|	http://e107.org
|	hide@address.com
|
|	Released under the terms and conditions of the
|	GNU General Public License (http://gnu.org).
+---------------------------------------------------------------+
*/

    $configtitle = "Live For Speed - Home";
    $pageid = "home";  // unique name that matches the one used in admin_menu.php.
	$show_preset = TRUE; // allow e107 presets to be saved for use in the form.

require_once("../../class2.php");
require_once(e_PLUGIN."Liveforspeed/languages/".e_LANGUAGE.".php");
if(!getperms("1")){ header("location:".e_BASE."index.php"); exit ;}
require_once(e_ADMIN."auth.php");
require_once(e_HANDLER."form_handler.php");
$rs = new form;


if(IsSet($_POST['update_ring'])){
	if(IsSet($_POST['random']) || empty($_POST['pic_web'])){
		$text = "Submission Complete <br> <a href=\"".e_SELF."\">Click here to reconfigure</a>";
	}
	else{
		$text = "Submission Complete <br> <a href=\"".e_SELF."\">Click here to reconfigure</a>";
	}

//--------------------------- Submit Line 1 ---------------------------
	  $pref['Liveforspeed_player1'] = $_POST['Liveforspeed_player1'];
	  $pref['Liveforspeed_player2'] = $_POST['Liveforspeed_player2'];
	  $pref['Liveforspeed_player3'] = $_POST['Liveforspeed_player3'];
	  $pref['Liveforspeed_player4'] = $_POST['Liveforspeed_player4'];
	  $pref['Liveforspeed_player5'] = $_POST['Liveforspeed_player5'];
	  $pref['Liveforspeed_player1_name'] = $_POST['Liveforspeed_player1_name'];
	  $pref['Liveforspeed_player2_name'] = $_POST['Liveforspeed_player2_name'];
	  $pref['Liveforspeed_player3_name'] = $_POST['Liveforspeed_player3_name'];
	  $pref['Liveforspeed_player4_name'] = $_POST['Liveforspeed_player4_name'];
	  $pref['Liveforspeed_player5_name'] = $_POST['Liveforspeed_player5_name'];
	  $pref['Liveforspeed_no'] = $_POST['Liveforspeed_no'];
	  $pref['Liveforspeed_detail'] = $_POST['Liveforspeed_detail'];


	save_prefs();
	$caption = "Live For Speed Configuration";
}

else{
	$caption = "Live For Speed Configuration";
	$text = "<h2>You need to fill the members in from the top down!</h2>
	<br />
	<form method='post' action='".e_SELF."?update' name='$link_name'>
	";
	
	$handle=opendir(e_PLUGIN."e107lfs_MENU/images/pics/");
	while ($file = readdir($handle)){
		if($file != "." && $file != ".."){
			$lfs_MENU_icon[] = $file;
		}
	}

$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>Number Of Players</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_no",2,$pref['Liveforspeed_no'],2)."<br />
</td>
</tr>";
$text .= "<tr>\n
<td style='width:50%' class='forumheader3'>Show Deatails Popup \n
</td><td style='width:50%' class='forumheader3' colspan='2' >";
if($pref['Liveforspeed_detail']==1){
	$text .= $rs -> form_checkbox("Liveforspeed_detail",1,1);
}else{
	$text .= $rs -> form_checkbox("Liveforspeed_detail",1,0);
}
$text.="</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'><br><b>Player 1</b></td></tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 1 Username</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player1",40,$pref['Liveforspeed_player1'],40)."<br />
</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 1 Display Name</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player1_name",40,$pref['Liveforspeed_player1_name'],40)."<br />
</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'><br><b>Player 2</b></td></tr>";
$text.="</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 2 Username</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player2",40,$pref['Liveforspeed_player2'],40)."<br />
</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 2 Display Name</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player2_name",40,$pref['Liveforspeed_player2_name'],40)."<br />
</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'><br><b>Player 3</b></td></tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 3 Username</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player3",40,$pref['Liveforspeed_player3'],40)."<br />
</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 3 Display Name</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player3_name",40,$pref['Liveforspeed_player3_name'],40)."<br />
</td>
</tr>";
$text.="</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'><br><b>Player 4</b></td></tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 4 Username</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player4",40,$pref['Liveforspeed_player4'],40)."<br />
</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 4 Display Name</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player4_name",40,$pref['Liveforspeed_player4_name'],40)."<br />
</td>
</tr>";
$text.="</td>
</tr>";
$text.="</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'><br><b>Player 5</b></td></tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 5 Username</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player5",40,$pref['Liveforspeed_player5'],40)."<br />
</td>
</tr>";
$text.="</td></tr><tr><td style='width:50%' class='forumheader3'>PLayer 5 Display Name</td><td style='width:50%' class='forumheader3' colspan='2' >".$rs -> form_text("Liveforspeed_player5_name",40,$pref['Liveforspeed_player5_name'],40)."<br />
</td>
</tr>";

  
  
 $text .= "
	</table></div>
  <br />
	<input class='button' type='submit' name='update_ring' value='".lfs_MENU_7."' />
	
	</form>";
}
$ns -> tablerender($caption, $text);
require_once(e_ADMIN."footer.php");
?>
Return current item: e107_help Plugin