\n"; exit(); } function timestamp2date_notime($ts) { if($ts>0) return date("Y-m-d",$ts); else return ""; } function timestamp2date($ts) { if($ts>0) return date("Y-m-d H:i",$ts); else return ""; } function date2timestamp($d) { if($d!="") return strtotime($d); else return 0; } function is_allowed($imod,$bit) { global $ses_userperms; return ((0+substr($ses_userperms,$imod,1)) & $bit); } function timestamp2normaldate($ts) { if($ts>0) return date("d/m/Y",$ts); else return ""; } function has_perm($perm,$imod,$bit) { return ((0+substr($perm,$imod,1)) & $bit); } function allowed2do($ouid,$ogid,$rperms,$bit) { global $ses_userid,$ses_groupid; if( $ses_userid==1 ) return true; if( $ses_userid==$ouid && has_perm($rperms,0,$bit) ) return true; if( $ses_groupid==$ogid && has_perm($rperms,1,$bit) ) return true; if( has_perm($rperms,2,$bit) ) return true; return false; } function print_options($arr,$sel) { $k=@array_keys($arr); for($i=0; $i".$arr[$k[$i]].""; } } function print_Answer($sel,$text,$val,$i,$j,$valarr,$more="") { switch ($sel) { case "1":echo ""; if (in_array($val,$valarr)&&($more!="")) { echo "".$text."";} else echo $text; break; case "2":echo ""; if (in_array($val,$valarr)&&($more!="")) { echo "".$text."";} else echo $text; break; } } function getStyleSheet() { global $HTTP_SERVER_VARS; if(strstr($HTTP_SERVER_VARS["HTTP_USER_AGENT"],"MSIE")) return ""; else return ""; } function showRecProps($cdate,$udate) { global $HTTP_SERVER_VARS; if(strstr($HTTP_SERVER_VARS["HTTP_USER_AGENT"],"MSIE")) { echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Creation date :".timestamp2date($cdate)."
Last update :".timestamp2date($udate)."
\n"; echo "
\n"; } //@todo: 4 netscape } function showAttachmentInline($title,$URI,$mime,$w,$h,$more="") { global $IN_MEDIA_URL; $ret=""; if(strstr($mime,"image/")) { $ret="0) $ret.="width='".$w."' "; if($ht>0) $ret.="height='".$h."' "; if($more!="") $ret.=$more; $ret.=">"; } else if(stristr($mime,"audio/")) { $ret.="0) $ret.="width='".$w."' "; if($h>0) $ret.="height='".$h."' "; if($more!="") $ret.=$more; $ret.=" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\">"; } else $ret="".$title.""; return $ret; } function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } ?> open($DB_SRV,$DB_USR,$DB_PAS,$DB_NAM); ?>