<?

/*
FlexCMS (http://www.flexcms.com)
Flexible, Powerful, Affordable.

Contents of this file are protected by the copyright
notice found at http://www.flexcms.com/flex/pages/copyright.html,
and its usage is subject to the terms of the licensing agreement 
available at http://www.flexcms.com/flex/pages/license.html
*/



	// ========================================================================================
	// manage news/articles
	// ========================================================================================
	
	$query = "select * from `".$Settings['DBPrefix']."na-Settings`";
	$result = mysql_query($query) or die (mysql_error());
	while ($row = mysql_fetch_array($result)) {
		$nlSettings[$row['Name']] = $row['Value'];
	}
	
	
	$PageTitle = $MsgText[7][5];
	$BrowserTitle = $MsgText[7][5];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="' . $MainURL . '/options.html">'.$MsgText[0][4].'</a> > '.$MsgText[7][5];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[703] == 'y') {
			

				$query2 = "select * from `".$Settings['DBPrefix']."na-Categories` order by CategoryName";
				$result2 = mysql_query($query2) or die (mysql_error());
				while ($row2 = mysql_fetch_array($result2)) {
					$CategoriesList .= '<input type="checkbox" name="Categories[]" value="'.$row2['RecordNumber'].',"> '.$row2['CategoryName'].' ('.$row2['RecordNumber'].')<br>';
				}
			
				
				$PageContents = '<form action="'.$MainURL.'/admin/articles-generate-submit" method="post">
					<br><b>'.$MsgText[7][41].':</b><br>
					<input type="radio" name="StyleCode" value="1" checked> <b>1</b> - '.$MsgText[7][42].'<br>
					<input type="radio" name="StyleCode" value="2"> <b>2</b> - '.$MsgText[7][85].'<br>
					<input type="radio" name="StyleCode" value="3"> <b>3</b> - '.$MsgText[7][86].'<br>
					<input type="radio" name="StyleCode" value="4"> <b>4</b> - '.$MsgText[7][87].'<br>
					
					<br><br>
					
					<b>'.$MsgText[7][43].':</b><br>
					<input type="text" name="ArticlesCount" size="5" value="5">
					<br><br><b>'.$MsgText[7][44].':</b><br>
					<input type="text" name="ArticlesOffset" size="5" value="0"><br><font size="1">'.$MsgText[7][45].'<br></font>
					
					<br><br>
					
					<b>'.$MsgText[7][46].':</b><br>
					<input type="radio" name="CategoriesSelector" value="all" checked> '.$MsgText[7][47].'<br>
					<input type="radio" name="CategoriesSelector" value="selected"> '.$MsgText[7][48].':<br>
					<table border="0" cellpadding="0" cellspacing="0"><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$CategoriesList.'</td></tr></table>


					<br><br><br><br><input type="submit" value="'.$MsgText[7][49].'">

					</form>';
				
			
			
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}
		


?>
