| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?
- function ico($name="",$url="", $txt=""){
- global $xpath;
- $ret="";
- //echo"----dupa|$name";
- if ($name){
- if ($url && $txt){
- $ret ="<img border=\"0\" src=\"$xpath/ico/$name.gif\" width=\"16\" align=\"absmiddle\" height=\"16\" alt=\"$txt\">";
- $ret .="<a href=\"$url\" > $txt</a> ";
- } else if($url){
- $ret ="<a href=\"mod.php?mod=billing&wp=login&op=$op\" > ";
- $ret .="<img border=\"0\" src=\"$xpath/ico/$name.gif\" width=\"16\" align=\"absmiddle\" height=\"16\">";
- $ret .="</a> ";
- }else if ($txt){
- $ret ="<img border=\"0\" src=\"$xpath/ico/$name.gif\" width=\"16\" align=\"absmiddle\" height=\"16\" alt=\"$txt\"> ";
- }else{
- $ret ="<img border=\"0\" src=\"$xpath/ico/$name.gif\" width=\"16\" align=\"absmiddle\" height=\"16\"> ";
- }
- }
- return $ret;
- }
- function isfile($name){
- $is=(@fclose(@fopen($name, "r")));
- return($is);
- }
- function is_user($perm=""){
-
- // $perm=explode(",", $perm);
- if ($perm=="admin" OR $perm=="adm"){
- $perm=1;
- }
- if ($_SESSION[u_id]>0 AND $_SESSION[login]==1){
- //echo"$_SESSION[u_id]==$_SESSION[u_perm]";
- if ($perm){
- // if (($_SESSION[u_perm]==$perm[1] AND $perm[1]) || ($_SESSION[u_perm]==$perm[2] AND $perm[2]) || ($_SESSION[u_perm]==$perm[3] AND $perm[3]) || ($_SESSION[u_perm]==$perm[4] AND $perm[4]) || ($_SESSION[u_perm]==$perm[5] AND $perm[5])){
- if ($_SESSION[u_perm]==$perm OR ($perm=='2' AND $_SESSION[u_perm]=='1')){
- return $_SESSION[u_id];
- }else{
- return 0;
- }
- }else{
- return $_SESSION[u_id];
- }
- }else{
- return 0;
- }
- }
- function upload($file,$path){
- }
- function OpenTable(){
- echo"<table border=\"0\" width=\"615\" cellspacing=\"0\" cellpadding=\"0\">\n";
- echo"<tr>\n";
- echo"<td width=\"100%\" valign=\"middle\" align=\"left\">";
- }
- function Close(){
- echo"</td>\n";
- echo"</tr>\n";
- echo"</table>";
- }
- function refreshclose(){
- ?>
- <script>
- <!--
- window.opener.location.reload();
- window.close();
- //-->
- </script>
- <?
- }
- function refresh(){
- ?>
- <script>
- <!--
- window.opener.location.reload();
- // window.close();
- //-->
- </script>
- <?
- }
- function redirect($where){
- ?>
- <script>
- <!--
- window.location='<? echo $where;?>';
- // window.close();
- //-->
- </script>
- <?
- }
- ?>
|