| 1 | <?php
 | 
  
    | 2 | /**
 | 
  
    | 3 |  *
 | 
  
    | 4 |  * @category        admin
 | 
  
    | 5 |  * @package         pages
 | 
  
    | 6 |  * @author          WebsiteBaker Project
 | 
  
    | 7 |  * @copyright       2004-2009, Ryan Djurovich
 | 
  
    | 8 |  * @copyright       2009-2011, Website Baker Org. e.V.
 | 
  
    | 9 |  * @link			http://www.websitebaker2.org/
 | 
  
    | 10 |  * @license         http://www.gnu.org/licenses/gpl.html
 | 
  
    | 11 |  * @platform        WebsiteBaker 2.8.x
 | 
  
    | 12 |  * @requirements    PHP 5.2.2 and higher
 | 
  
    | 13 |  * @version         $Id: intro.php 2070 2014-01-03 01:21:42Z darkviper $
 | 
  
    | 14 |  * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/pages/intro.php $
 | 
  
    | 15 |  * @lastmodified    $Date: 2014-01-03 02:21:42 +0100 (Fri, 03 Jan 2014) $
 | 
  
    | 16 |  *
 | 
  
    | 17 |  */
 | 
  
    | 18 | 
 | 
  
    | 19 | // Create new admin object
 | 
  
    | 20 | require('../../config.php');
 | 
  
    | 21 | 
 | 
  
    | 22 | require_once(WB_PATH.'/framework/class.admin.php');
 | 
  
    | 23 | $admin = new admin('Pages', 'pages_intro');
 | 
  
    | 24 | $content = '';
 | 
  
    | 25 | 
 | 
  
    | 26 | $filename = WB_PATH.PAGES_DIRECTORY.'/intro'.PAGE_EXTENSION;
 | 
  
    | 27 | 
 | 
  
    | 28 | if(file_exists($filename) && filesize($filename) > 0) {
 | 
  
    | 29 | 	$content = file_get_contents( $filename ) ;
 | 
  
    | 30 | } else {
 | 
  
    | 31 | 	$content = file_get_contents( ADMIN_PATH.'/pages/html.php' ) ;
 | 
  
    | 32 | }
 | 
  
    | 33 | 
 | 
  
    | 34 | require_once(WB_PATH . '/include/editarea/wb_wrapper_edit_area.php');
 | 
  
    | 35 | $toolbar = 'search, fullscreen, |, undo, redo, |, select_font, syntax_selection,|,word_wrap, highlight, reset_highlight, |,charmap, |, help';
 | 
  
    | 36 | echo registerEditArea ('content','php',true,'both',true,true,600,450,$toolbar);
 | 
  
    | 37 | function show_wysiwyg_editor($name,$id,$content,$width,$height) {
 | 
  
    | 38 | 	echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
 | 
  
    | 39 | }
 | 
  
    | 40 | ?>
 | 
  
    | 41 | <form action="intro2.php" method="post">
 | 
  
    | 42 | <?php print $admin->getFTAN(); ?>
 | 
  
    | 43 | <input type="hidden" name="page_id" value="{PAGE_ID}" />
 | 
  
    | 44 | <table cellpadding="0" cellspacing="0" border="0" class="form_submit">
 | 
  
    | 45 | 	<tr>
 | 
  
    | 46 | 		<td colspan="2">
 | 
  
    | 47 | 		<?php
 | 
  
    | 48 | 			show_wysiwyg_editor('content','content',$content,'100%','500px');
 | 
  
    | 49 | 		?>
 | 
  
    | 50 | 		</td>
 | 
  
    | 51 | 	</tr>
 | 
  
    | 52 | 	<tr>
 | 
  
    | 53 | 		<td class="left">
 | 
  
    | 54 | 			<input type="submit" value="<?php echo $TEXT['SAVE'];?>" class="submit" />
 | 
  
    | 55 | 		</td>
 | 
  
    | 56 | 		<td class="right">
 | 
  
    | 57 | 			<input type="button" value="<?php echo $TEXT['CANCEL'];?>" onclick="javascript: window.location = 'index.php';" class="submit" />
 | 
  
    | 58 | 		</td>
 | 
  
    | 59 | 	</tr>
 | 
  
    | 60 | </table>
 | 
  
    | 61 | 
 | 
  
    | 62 | </form>
 | 
  
    | 63 | <?php
 | 
  
    | 64 | // Print admin footer
 | 
  
    | 65 | $admin->print_footer();
 |