Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sat, Nov 8, 11:58 AM

in-portal

Index: trunk/admin/help/help.php
===================================================================
--- trunk/admin/help/help.php (revision 3075)
+++ trunk/admin/help/help.php (revision 3076)
@@ -1,70 +1,70 @@
<?php
// new startup: begin
define('REL_PATH', 'admin/help');
$relation_level = count( explode('/', REL_PATH) );
define('FULL_PATH', realpath(dirname(__FILE__) . str_repeat('/..', $relation_level) ) );
require_once FULL_PATH.'/kernel/startup.php';
// new startup: end
$pathtolocal = $pathtoroot."kernel/";
require_once ($pathtoroot.$admin."/include/elements.php");
//require_once ($pathtoroot."kernel/admin/include/navmenu.php");
//require_once ($pathtolocal."admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
$section = $_REQUEST["section"];
$envar = BuildEnv();
int_help_header();
$section = explode(':', $section);
if($section[0] == 'in-portal') $section[0] = 'kernel';
$topic_path = FULL_PATH.'/'.$section[0].'/'.$admin.'/include/help/'.$section[1].'.txt';
// for debugging: save new help content
if( GetVar('action') == 'save_help' )
{
error_reporting(E_ALL);
$fp = fopen($topic_path, 'w');
fwrite($fp, stripslashes(GetVar('help_content')) );
fclose($fp);
}
$help_data = file_exists($topic_path) ? file_get_contents($topic_path) : GetVar('help_content');
if($section[0] == 'kernel') $section[0] = 'in-portal';
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<tr>
<td bgcolor="F6F6F6">
<div class="help_box">
<?php
if( file_exists($topic_path) )
echo $help_data;
else
- echo defined('DEBUG_HELP') ? 'missing section help file <b>'.$section[1].'.txt</b><br>' : admin_language('la_help_in_progress');
+ echo defined('DBG_HELP') && DBG_HELP ? 'missing section help file <b>'.$section[1].'.txt</b><br>' : admin_language('la_help_in_progress');
?>
</div>
<?php
- if( defined('DEBUG_HELP') )
+ if( defined('DBG_HELP') && DBG_HELP )
{
?>
<br><input type="button" onclick="document.save_help.submit();" value="Save Changes" style="font-weight: bolder; background-color: #F6F6F6;"><br>
<form name="save_help" id="save_help" method="post" action="<?php echo $_SERVER['PHP_SELF'].'?env='.$envar; ?>">
<textarea id="help_content" name="help_content" rows="15" cols="85"><?php echo $help_data; ?></textarea>
<input type="hidden" name="section" value="<?php echo implode(':',$section); ?>">
<input type="hidden" name="action" value="save_help">
<?php if( GetVar('help_usage') ) { ?>
<input type="hidden" name="help_usage" value="<?php echo GetVar('help_usage'); ?>">
<?php } ?>
</form>
<?php
}
?>
</td>
</tr>
</table>
<? int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/help/help.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12
\ No newline at end of property
+1.13
\ No newline at end of property

Event Timeline