Changeset 2793

Show
Ignore:
Timestamp:
10/19/06 10:06:03 (7 years ago)
Author:
diego_iastrubni
Message:

html + php fixes

config.php - address should use & instead of &
header_auth.php - take care of i18n/l10n
header.php - header does not use <li> anymore, it's breaking the standards

*.css - new alterative css, mainstyle.css has been adapted to the changes of heade.php
footer.php - code cleanups + i18n/l10n


Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/common/mainstyle.css

    r2726 r2793  
    7171    border-width:0; 
    7272} 
    73 div.header li
     73div.header span
    7474    line-height: 60px; 
    7575  list-style-type: none; 
  • freepbx/trunk/amp_conf/htdocs/admin/config.php

    r2748 r2793  
    247247  <p>There are a large number of Plug-in modules available from the Online Repository. This is 
    248248  available by clicking on the <a href="config.php?type=tool">Tools menu</a> up the top, then 
    249   <a href="config.php?type=tool&display=modules">Module Admin</a>, then 
     249  <a href="config.php?display=modules&amp;type=tool">Module Admin</a>, then 
    250250  <a href="config.php?display=modules&amp;type=tool&amp;extdisplay=online">Connect to Online Module Repository</a>. 
    251251  Modules are updated and patched often, so if you are having a problem, it's worth checking there to see if there's 
  • freepbx/trunk/amp_conf/htdocs/admin/footer.php

    r2716 r2793  
    1212//GNU General Public License for more details. 
    1313 
    14   require_once('common/db_connect.php'); //PEAR must be installed 
    15    
    16   //determine if asterisk reload is needed 
    17   $sql = "SELECT value FROM admin WHERE variable = 'need_reload'"; 
    18   $need_reload = $db->getRow($sql); 
    19   if(DB::IsError($need_reload)) { 
    20     die($need_reload->getMessage()); 
    21   } 
     14require_once('common/db_connect.php'); //PEAR must be installed 
     15 
     16//determine if asterisk reload is needed 
     17$sql = "SELECT value FROM admin WHERE variable = 'need_reload'"; 
     18$need_reload = $db->getRow($sql); 
     19if(DB::IsError($need_reload)) { 
     20  die($need_reload->getMessage()); 
     21
     22 
    2223//check to see if we are requesting an asterisk reload 
    2324if (isset($_REQUEST['clk_reload'])) { 
     
    5051        } 
    5152 
    52         document.getElementById('idWaitBanner').innerHTML = 'Configuration applied'; 
     53        document.getElementById('idWaitBanner').innerHTML = '" . _("Configuration applied") . "' 
    5354        document.getElementById('idWaitBanner').className = 'clsWaitFinishOK'; 
    5455        setTimeout('hideWaitBanner()',3000); 
     
    8081    //store asterisk reloaded status 
    8182    $sql = "UPDATE admin SET value = 'false' WHERE variable = 'need_reload'";  
    82     $result = $db->query($sql);  
    83     if(DB::IsError($result)) {      
    84       die($result->getMessage());  
     83    $result = $db->query($sql); 
     84    if(DB::IsError($result)) { 
     85      die($result->getMessage()); 
    8586    } 
    8687    $need_reload[0] = 'false'; 
     
    8990  } 
    9091} 
     92 
    9193if (isset($_SESSION["AMP_user"]) && ($_SESSION["AMP_user"]->checkSection(99))) { 
    9294  if ($need_reload[0] == 'true') { 
    93     if (isset($_REQUEST['display'])) { 
    94   ?> 
    95   <div class="inyourface"><a href="<?php  echo $_SERVER["PHP_SELF"]?>?<? echo (isset($_REQUEST['type']))?'type='.$_REQUEST['type'].'&amp;':''; ?>display=<?php  echo $_REQUEST['display'] ?>&amp;clk_reload=true"><?php echo _("You have made changes - when finished, click here to APPLY them") ?></a></div> 
    96   <?php } else { ?> 
    97   <div class="inyourface"><a href="<?php  echo $_SERVER["PHP_SELF"]?>?clk_reload=true"><?php echo _("You have made changes - when finished, click here to APPLY them") ?></a></div> 
    98   <?php  
    99     } 
     95    $href =  $_SERVER["PHP_SELF"] . "?clk_reload=true"; 
     96    if (isset($_REQUEST['display']))  
     97      $href .= '&amp;display='.$_REQUEST['display']; 
     98    if (isset($_REQUEST['type'])) 
     99      $href .= '&amp;type='.$_REQUEST['type']; 
     100 
     101    echo "<div class='inyourface'><a href='$href' >"; 
     102    echo _("You have made changes - when finished, click here to APPLY them"); 
     103    echo "</a></div>\n"; 
    100104  } 
    101105} 
    102106 
    103107if (!$quietmode) { 
    104 ?> 
    105      
    106     <div class="footer" style="text-align:center;"> 
    107     <!--<a target="_blank" href="http://sourceforge.net/donate/index.php?group_id=121515"><img border="0" style="float:left;" alt="Donate to the Asterisk Management Portal project" src="http://images.sourceforge.net/images/project-support.jpg"></a>--> 
    108   <?php 
    109   if (isset($amp_conf["AMPFOOTERLOGO"])){ 
    110     if (isset($amp_conf["AMPADMINHREF"])){?> 
    111             <a target="_blank" href="http://<?php echo $amp_conf["AMPADMINHREF"] ?>"><img border="0" src="images/<?php echo $amp_conf["AMPFOOTERLOGO"] ?>"></a> 
    112     <?php } else{ ?> 
    113             <a target="_blank" href="http://www.freepbx.org"><img border="0" src="images/<?php echo $amp_conf["AMPFOOTERLOGO"] ?>"></a> 
    114     <?php } ?> 
    115   <?php } else{ ?> 
    116           <a target="_blank" href="http://www.freepbx.org"><img border="0" src="images/freepbx_small.png"></a> 
    117   <?php }  ?>         
    118   <a target="_blank" href="http://www.freepbx.org"><img border="0" style="float:left;" src="images/freepbx_small.png"></a> 
    119         <br> 
    120     <br> 
    121 <?php 
    122   echo "Version "; 
    123   $ver=getversion(); echo $ver[0][0]; 
    124   echo " on <b>".$_SERVER["SERVER_NAME"]."</b>"; 
    125 ?> 
    126     <br> 
    127     <br> 
    128     </div> 
    129 <?php  
     108  echo "\n\t<div class='_footer' style='text-align:center;'>\n"; 
     109 
     110  if (isset($amp_conf["AMPFOOTERLOGO"])) { 
     111    $AMPFOOTERLOGO = $amp_conf["AMPFOOTERLOGO"]; 
     112    if (isset($amp_conf["AMPADMINHREF"])) 
     113      $AMPADMINHREF = $amp_conf["AMPADMINHREF"]; 
     114    else  
     115      $AMPADMINHREF = "http://www.freepbx.org"; 
     116  } else { 
     117    $AMPADMINHREF = "http://www.freepbx.org"; 
     118    $AMPFOOTERLOGO = "freepbx_small.png"; 
     119  } 
     120  $ALT = $AMPADMINHREF; 
     121   
     122  echo "\t\t<a target='_blank' href='$AMPADMINHREF'><img border='0' src='images/$AMPFOOTERLOGO' alt='$ALT' ></a>\n"; 
     123  echo "\t\t<a target='_blank' href='http://www.freepbx.org'><img border='0' style='float:left;' src='images/freepbx_small.png' alt='$ALT'></a>\n"; 
     124 
     125  $ver = getversion(); 
     126  // TODO : i18n 
     127  // the string should be "Version $1, on <b>$2</b>", and the $1, $2 should be replaced 
     128  // in run time 
     129  echo "\t\tVersion " . $ver[0][0] . " on <b>".$_SERVER["SERVER_NAME"]."</b>"; 
     130  echo "\n\t\t<br><br>\n\t</div>"; 
    130131} 
    131132?> 
  • freepbx/trunk/amp_conf/htdocs/admin/header.php

    r2789 r2793  
    1818    return; 
    1919 
    20   $html = "<a "; 
     20  $html = "<b>&bull;</b> <span><a "; 
    2121 
    2222  if ($href == NULL) 
     
    2424 
    2525  if ($new_window != NULL) 
    26     $html .= " target=\"_blank\" "; 
     26    $html .= "target=\"_blank\" "; 
    2727   
    2828  if ($is_current) 
    29     $html .= "id=current "; 
    30   $html .= "href=\"$href\"> &#8226; <li>$name</li></a>"; 
     29    $html .= "id=\"current\" "; 
     30 
     31  $html .= "href=\"$href\">&nbsp; $name</a></span>"; 
    3132 
    3233  print("\t\t$html\n"); 
     
    6970  <link href="common/mainstyle.css" rel="stylesheet" type="text/css">  
    7071  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > 
    71   <?php  
     72<?php  
     73  // check if in the amp configuration the user has set that 
     74  // he wants to use an alternative style-sheet. 
     75  // on Xorcom's TS1, it's used when the system is in rescue mode. 
     76  if (isset($amp_conf["ALTERNATIVE_CSS"])) 
     77  { 
     78    if (($amp_conf["ALTERNATIVE_CSS"] == "1") || 
     79      ($amp_conf["ALTERNATIVE_CSS"] == "yes") || 
     80      ($amp_conf["ALTERNATIVE_CSS"] == "true")) 
     81      echo "\t<link href=\"common/mainstyle-alternative.css\" rel=\"stylesheet\" type=\"text/css\">"; 
     82  } 
     83 
    7284  if (isset($display) && is_file("modules/{$display}/{$display}.css")) { 
    73     echo " <link href=\"modules/{$display}/{$display}.css\" rel=\"stylesheet\" type=\"text/css\">\n"; 
     85    echo "\t<link href=\"modules/{$display}/{$display}.css\" rel=\"stylesheet\" type=\"text/css\">\n"; 
    7486  } 
    75  ?> 
     87?> 
    7688   
    7789  <script type="text/javascript" src="common/script.js.php"></script> 
     
    96108  <div class="header"> 
    97109<?php 
     110    $freepbx_alt = _("freePBX"); 
    98111    if (isset($amp_conf["AMPADMINLOGO"]) && is_file($amp_conf["AMPWEBROOT"]."/admin/images/".$amp_conf["AMPADMINLOGO"])) 
    99       echo "\t\t<a href=\"index.php\"><img src=\"images/" . $amp_conf["AMPADMINLOGO"] . "\"/></a>\n"; 
     112      echo "\t\t<a href=\"index.php\"><img src=\"images/" . $amp_conf["AMPADMINLOGO"] . "\" alt=\"$freepbx_alt\" /></a>\n"; 
    100113    else 
    101114      echo "\t\t<a href=\"index.php\"><img src=\"images/freepbx.png\"/></a>\n"; 
  • freepbx/trunk/amp_conf/htdocs/admin/header_auth.php

    r2716 r2793  
    113113 
    114114if ( !(isset($result) ? $result : false) ) { 
    115   echo '<br><br><br><br><h2><center>You must log in first before you can access this page.</center></h2><br><br><br><br>';  
    116  
     115  echo "\t<br><br><br><br><center><h2>"; 
     116  echo _("You must log in first before you can access this page."); 
     117  echo "</h2></center><br><br><br><br>\n";  
    117118  include 'footer.php'; 
    118119  exit;