<?php header('Content-Type: text/html; charset=UTF-8'); ?>
<html dir="rtl">
<head>
<title>دÙÙ٠إستخداÙ
اÙÙØ§Ùب Ø§ÙØ³ÙÙ</title>
<style>
body{
color: #000000;
background-color: #ffffff;
margin: 0;
padding: 0;
}
.header{
color: #ffffff;
background-color: #009900;
font-size: 18pt;
padding: 10px;
border-bottom: 2px solid #006600;
}
.content{
font-size: 14pt;
padding: 5px;
border-bottom: 2px solid #006600;
}
.code{
border:1px solid;
padding:3px;
direction:ltr;
background-color:#EFEFEF;
font-size:14px;
}
</style>
</head>
<div class="header">دÙÙ٠إستخداÙ
اÙÙØ§Ùب Ø§ÙØ³ÙÙ</div>
<table border="1" width="100%"><tr align="center"><td width="40px"><a href="#">Ø§ÙØ³Ø§Ø¨Ù</a></td><td><a href="?">Ø§ÙØ±Ø¦ÙØ³ÙØ©</a></td><td width="40px"><a href="#">Ø§ÙØªØ§ÙÙ</a></td></tr></table>
<div class="content">
<?php
if(isset($_GET['func'])){
$fn = "$_GET[func]-function.xml";
if(file_exists($fn)){
$data = file_get_contents($fn);
$xml = simplexml_load_file($fn);
$tbl .='<p><font size="4">'.$xml->name.'</font> <br />';
$tbl .='<font size="4">'.$xml->description.'</font> </p>';
$tbl .='<p><font size="5">Ø§ÙØµÙغة</font> <br />';
$tbl .='<font size="3"><pre>'.$xml->syntax.'</pre></font> </p>';
$tbl .='<p><font size="5">اÙÙ
ÙØ³Ø·Ø§Øª</font> <br />';
foreach($xml->parameter as $para){
$tbl .='<font size="3">'.$para->name.'='.$para->description.'</font> + ';
}
$tbl .='</p>';
$tbl .='<p><font size="5">Ø§ÙØ£Ù
Ø«ÙØ©</font> <br />';
foreach($xml->example as $exa){
$exa->php = htmlspecialchars(highlight_string(trim($exa->php),true));
$exa->html = htmlspecialchars(highlight_string(trim($exa->html),true));
$exa->text = htmlspecialchars(highlight_string(trim($exa->text),true));
$tbl .='<div style="direction:ltr;">'.$exa->name.'</div>';
$tbl .='<div class="code"><table width="100%"><tr>';
$tbl .='<td width="33%">'.$exa->php.'</td>';
$tbl .='<td width="33%">'.$exa->html.'</td>';
$tbl .='<td width="33%">'.$exa->text.'</td>';
$tbl .='</tr></table></div>';
}
$tbl .='</p>';
print $tbl;
}
}else{
$xml = simplexml_load_file('manual.xml');
$htm .="<p><b><font size=\"5\">Ù
ÙØ¯Ù
Ø©</font></b><br />$xml->intro</p>";
$htm .='<b><font size=\"5\">ÙØ¸Ø§Ø¦Ù اÙÙØ§Ùب:</font></b><ul>';
foreach($xml->function as $fun){
$htm .='<li><a href="?func='.$fun.'">'.$fun.'</a></li>';
}
$htm .='</ul>';
print $htm;
}
?>
<table border="1" width="100%"><tr align="center"><td width="40px"><a href="#">Ø§ÙØ³Ø§Ø¨Ù</a></td><td><a href="?">Ø§ÙØ±Ø¦ÙØ³ÙØ©</a></td><td width="40px"><a href="#">Ø§ÙØªØ§ÙÙ</a></td></tr></table>
</div>
</body>
</html>