Changeset 128 for trunk


Ignore:
Timestamp:
01/05/2006 01:43:46 AM (6 years ago)
Author:
paravoid
Message:

Cleanup globals/functions.php

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/globals/classes/construct.php

    r1 r128  
    2424        function form($form, $template='constructors/form.tpl') { 
    2525                global $smarty; 
    26                 //echo pvar($data); 
    2726                if (substr(strrchr($template, "."), 1) != "tpl") { 
    2827                        $path_parts = pathinfo($template); 
     
    4847                        } 
    4948                } 
    50                 //echo pvar($table->data); 
    5149                return template(array("data" => $table->data, "extra_data" => $table->info, "hidden_qs" => get_qs()), $template); 
    5250        } 
  • trunk/globals/functions.php

    r127 r128  
    2020 */ 
    2121 
    22 function pvar($var) { 
    23         if (is_array($var)) { 
    24                 $ret .= '<ul>'; 
    25                 while(list($key) = each($var)) { 
    26                         if (is_array($var[$key])) { 
    27                                 $ret .= '<li>'.$key.pvar($var[$key]).'</li>'; 
    28                         } else { 
    29                                 $ret .= '<li>'.$key.' = '.$var[$key].'</li>'; 
    30                         } 
    31                 } 
    32                 $ret .= '</ul>';                 
    33                 return $ret; 
    34         } else { 
    35                 return $var; 
    36         } 
    37 } 
    38  
    3922function redirect($url, $sec=0, $exit=TRUE) { 
    4023        global $main; 
     
    4629        if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) || $sec>0) { 
    4730                header("Refresh: $sec; URL=".html_entity_decode($url)); 
    48                 global $main; 
    4931                $main->html->head->add_meta("$sec; url=$url", "", "refresh"); 
    5032        } else { 
     
    10284} 
    10385 
    104 function getdirlist ($dirName, $dirs=TRUE, $files=FALSE) {  
     86function getdirlist($dirName, $dirs=TRUE, $files=FALSE) {  
    10587        $d = dir($dirName); 
    10688        $a = array(); 
     
    132114} 
    133115 
    134 function query_str ($params) { 
     116function query_str($params) { 
    135117   $str = ''; 
    136118   foreach( (array) $params as $key => $value) { 
     
    243225} 
    244226 
    245 function sendmail_fromlang($to, $message) { 
    246         global $lang; 
    247         return sendmail($to, $lang['email'][$message]['subject'], $lang['email'][$message]['body']); 
    248 } 
    249  
    250227function correct_ip($ip, $ret_null=TRUE) { 
    251228        if ($ip == '' && $ret_null === TRUE) return ''; 
     
    295272} 
    296273 
    297 function is_ip ($ip, $full_ip=TRUE) { 
     274function is_ip($ip, $full_ip=TRUE) { 
    298275        $ip_ex = explode(".", $ip, 4); 
    299276        if ($ip == '') return FALSE; 
     
    332309}  
    333310 
    334 function array_multimerge ($array1, $array2) { 
     311function array_multimerge($array1, $array2) { 
    335312        if (is_array($array2) && count($array2)) { 
    336313                foreach ($array2 as $k => $v) { 
  • trunk/includes/pages/nodes/nodes_plot.php

    r1 r128  
    4040                $point_a = new elevation($a_node[0]['latitude'], $a_node[0]['longitude']); 
    4141                $point_b = new elevation($b_node[0]['latitude'], $b_node[0]['longitude']); 
    42                 //echo pvar($a_node); 
    43                 //echo pvar($b_node); 
    4442                $image = plotlink($width, $height, $point_a, $point_b, (integer)$a_node[0]['elevation'], (integer)$b_node[0]['elevation']); 
    4543                 
Note: See TracChangeset for help on using the changeset viewer.