Changeset 1061
- Timestamp:
- 09/19/08 05:45:55 (4 months ago)
- Files:
-
- trunk/admin/Public/cls_phpconfig_html.php (modified) (1 diff)
- trunk/admin/Public/cls_phpconfig.php (modified) (1 diff)
- trunk/admin/Public/form_data/FG_var_user.inc (modified) (1 diff)
- trunk/admin/Public/phpconfig.php (modified) (3 diffs)
- trunk/admin/Public/templates/default/main.tpl (modified) (2 diffs)
- trunk/common/lib/admin.module.access.php (modified) (2 diffs)
- trunk/common/lib/admin.smarty.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/admin/Public/cls_phpconfig_html.php
r1051 r1061 27 27 include_once ("../lib/admin.smarty.php"); 28 28 29 if (! has_rights (ACX_ PBXCONFIG)){29 if (! has_rights (ACX_ADMINISTRATOR)){ 30 30 Header ("HTTP/1.0 401 Unauthorized"); 31 31 Header ("Location: PP_error.php?c=accessdenied"); trunk/admin/Public/cls_phpconfig.php
r1023 r1061 428 428 function OC_checkAccess($user) 429 429 { 430 431 430 $accessFile = array(); 432 431 trunk/admin/Public/form_data/FG_var_user.inc
r1033 r1061 47 47 $right_list["15"] = array( gettext("INVOICES"), "16384"); 48 48 $right_list["16"] = array( gettext("SUPPORT"), "32768"); 49 $right_list["17"] = array( gettext("PBX-CONFIG"), "65536");49 // removed! $right_list["17"] = array( gettext("Next Menu"), "65536"); 50 50 51 51 $len_right_list = count($right_list); trunk/admin/Public/phpconfig.php
r1033 r1061 16 16 include_once ("../lib/admin.defines.php"); 17 17 include_once ("../lib/admin.module.access.php"); 18 include_once ("../lib/regular_express.inc"); 19 include_once ("../lib/phpagi/phpagi-asmanager.php"); 18 20 include_once ("../lib/admin.smarty.php"); 19 21 20 if (! has_rights (ACX_PBXCONFIG)){ 22 23 if (! has_rights (ACX_ADMINISTRATOR)){ 21 24 Header ("HTTP/1.0 401 Unauthorized"); 22 25 Header ("Location: PP_error.php?c=accessdenied"); … … 163 166 164 167 // check if person is authorized to execute re-read configuration 165 $access_result = $conf->OC_checkAccess($_SESSION['valid_user']); 166 168 //$access_result = $conf->OC_checkAccess($_SESSION['valid_user']); 169 $access_result = true; 170 167 171 if ($access_result) 168 172 { 169 173 // re-read configuration 170 @system($conf->_OC_reset_cmd, $result);174 /*@system($conf->_OC_reset_cmd, $result); 171 175 if ($result == 0) 172 176 { … … 176 180 { 177 181 echo "<br>Reset failed.<br>"; 178 } 182 }*/ 183 184 $as = new AGI_AsteriskManager(); 185 $res = $as->connect(MANAGER_HOST,MANAGER_USERNAME,MANAGER_SECRET); 186 if ($res) 187 $res = $as->Command('reload'); 188 189 if ($res) { 190 echo "<br>Reset succeded.<br>"; 191 } else { 192 echo "<br>Reset failed.<br>"; 193 } 194 $as->disconnect(); 179 195 180 196 } trunk/admin/Public/templates/default/main.tpl
r1051 r1061 542 542 <li><a href="A2B_phpsysinfo.php?section=11">{php} echo "phpSysInfo";{/php}</a></li> 543 543 <li><a href="A2B_phpinfo.php?section=11">{php} echo "phpInfo";{/php}</a></li> 544 <li><a href="phpconfig.php?dir=/etc/asterisk§ion=11">{php} echo gettext("Asterisk config");{/php}</a></li> 544 545 </ul></li> 545 546 </ul> … … 549 550 {/if} 550 551 551 552 {if ($ACXPBXCONFIG > 0)}553 <div class="toggle_menu">554 <li><a href="javascript:;" class="toggle_menu" target="_self"><img id="img15"555 {if ($section == "15")}556 src="templates/{$SKIN_NAME}/images/minus.gif"557 {else}558 src="templates/{$SKIN_NAME}/images/plus.gif"559 {/if} onmouseover="this.style.cursor='hand';" WIDTH="9" HEIGHT="9"> <strong>{php} echo gettext("PBX-CONFIG");{/php}</strong></a></li>560 <div class="tohide"561 {if ($section =="15")}562 style="">563 {else}564 style="display:none;">565 {/if}566 <ul>567 <li><ul>568 569 <li><a href="phpconfig.php?file=sip.conf§ion=15§ion_conf=sip.conf">sip.conf</a></li>570 <li><a href="phpconfig.php?file=iax.conf§ion=15§ion_conf=iax.conf">iax.conf</a></li>571 <li><a href="phpconfig.php?file=extensions.conf§ion=15§ion_conf=extensions.conf">extensions.conf</a></li>572 <li><a href="phpconfig.php?dir=/etc/asterisk§ion=15">{php} echo gettext("All config files");{/php}</a></li>573 574 </ul></li>575 </ul>576 </div>577 </div>578 579 {/if}580 552 581 553 <li><a href="#" target="_self"></a></a></li> trunk/common/lib/admin.module.access.php
r1033 r1061 37 37 define ("ACX_INVOICING", 16384); // 1 << 13 38 38 define ("ACX_SUPPORT", 32768); // 1 << 14 39 define ("ACX_PBXCONFIG", 65536); // 1 << 1539 // define ("ACX_PBXCONFIG", 65536); // 1 << 15 40 40 41 41 header("Expires: Sat, Jan 01 2000 01:01:01 GMT"); … … 191 191 $ACXINVOICING2 = has_rights (ACX_INVOICING); 192 192 $ACXSUPPORT = has_rights (ACX_SUPPORT); 193 $ACXPBXCONFIG = has_rights (ACX_PBXCONFIG);194 193 195 194 trunk/common/lib/admin.smarty.php
r1033 r1061 55 55 $smarty->assign("ACXINVOICING", $ACXINVOICING); 56 56 $smarty->assign("ACXINVOICING2", $ACXINVOICING2); 57 $smarty->assign("ACXPBXCONFIG", $ACXPBXCONFIG);58 57 59 58
