diff --git a/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc b/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc
index ee78cb718edd212c6d38b86ec3548dd085e75115..1990dd30d9a69ab5c45d5c570a2fbc42391aaffa 100644 (file)
{
/* Definitions */
var $plHeadline = "FAX Reports";
- var $plDescription = "View the FAX report or single documents that have been recieved";
+ var $plDescription = "View the FAX report or single documents that have been received";
var $plIcon = "plugins/gofax/images/reports.png";
/* For internal use */
/* Create class */
function faxreport (&$config, &$ui)
{
+ $this->initTime = microtime(TRUE);
+
/* Include config object */
$this->config = $config;
$this->ui = &$ui;
foreach($tmp as $attrs){
$this->uidToDN[$attrs['uid'][0]] = $attrs['dn'];
}
+
+ // Create statistic table entry
+ stats::log('plugin', $class = get_class($this), $category = array($this->acl_category), $action = 'open',
+ $amount = 1, $duration = (microtime(TRUE) - $this->initTime));
+
}
// Set smarty defaults
$smarty= get_smarty();
- $smarty->assign("search_for" , $this->search_for);
+ $smarty->assign("search_for" , set_post($this->search_for));
$smarty->assign("months" , $months);
$smarty->assign("month_select" , $this->month);
$smarty->assign("years" , $years);
// Check database accessibility
if(!isset($this->config->data['SERVERS']['FAX'])){
- msg_dialog::display(_("Error"), _("No fax server found!"), ERROR_DIALOG);
+ msg_dialog::display(_("Error"), _("No FAX server found!"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}elseif(!is_callable("mysql_connect")){
msg_dialog::display(_("Configuration error"), sprintf(
$link = @mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD']);
if ($link === FALSE){
msg_dialog::display(_("Error"), sprintf(
- _("Cannot connect to %s database!"), "GOfax"), ERROR_DIALOG);
+ _("Cannot connect to %s database!"), "<b>".$cfg['SERVER'].":"."GOfax"."</b>"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
if (! @mysql_select_db("gofax")){
// Query for the requested fay entry
$query = "SELECT id,uid,date_format(queuing_time, '%Y%m%d%H%i%s') ".
"as queuing_time,status,sender_id,sender_msn,receiver_id,".
- "receiver_msn,pages,status_message,transfer_time FROM faxlog WHERE id=".$detail.";";
+ "receiver_msn,pages,status_message,transfer_time FROM faxlog WHERE id='".$detail."';";
$cfg= $this->config->data['SERVERS']['FAX'];
$result = @mysql_query($query);
$acls = $this->ui->get_permissions($dn,"users/viewFaxEntries","");
if(!preg_match("/r/",$acls)){
msg_dialog::display(_("Permission error"),
- _("You have no permission to view this fax id!"), ERROR_DIALOG);
+ _("You have no permission to view this FAX id!"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
$final="fax_$vname";
$v_acl = $this->ui->get_permissions($dn,"users/viewFaxEntries",preg_replace("/_/","",$vname));
if($line[$vname] != "" && preg_match("/r/i", $v_acl)){
- $smarty->assign("$final", $line[$vname]);
+ $smarty->assign("$final", set_post($line[$vname]));
} else {
$smarty->assign("$final", "-");
}
}
$format= _("Y-M-D");
$queuing_time= $line['queuing_time'];
- $smarty->assign("plug", "?plug=".validate($_GET['plug']));
- $smarty->assign("detail", validate($detail));
+
+ $plug = (isset($_GET['plug'])) ? '?plug='.$_GET['plug'] : '';
+ $smarty->assign("plug", $plug);
+ $smarty->assign("detail", set_post($detail));
$date= preg_replace("/Y/", substr($queuing_time,0,4), $format);
$date= preg_replace("/M/", substr($queuing_time,4,2), $date);
$date= preg_replace("/D/", substr($queuing_time,6,2), $date);
{
$faxreportfilter = session::get("faxreportfilter");
if(isset($_POST['EntriesPerPage'])){
- $this->range = $_POST['EntriesPerPage'];
+ $this->range = get_post('EntriesPerPage');
}
if (isset($_GET['start'])){
}
foreach( array("year", "month", "search_for") as $type){
if (isset($_POST[$type])){
- $faxreportfilter[$type]= $_POST[$type];
+ $faxreportfilter[$type]= get_post($type);
/* reset start page, if filter has changed */
if(!isset($_GET['start'])){
{
return (array(
- "plShortName" => _("View fax reports"),
- "plDescription" => _("View fax reports")." <i>"._("All entries are readonly")."</i>",
+ "plShortName" => _("View FAX reports"),
+ "plDescription" => _("View FAX reports")." <i>"._("All entries are read-only")."</i>",
"plRequirements"=> array(
'activePlugin' => 'faxreport',
'ldapSchema' => array('goFaxAccount' => '>=1.0.4'),
"plProvidedAcls" => array(
"detailedView" => _("Detailed view and download"),
"id" => _("Fax ID"),
+ "uid" => _("The username"),
"queuingtime" => _("Date")." / "._("Time"),
"status" => _("Status"),
"senderid" => _("Sender ID"),