From 07cf2c4b20230ddedee1bf9dddc1e7cd407385f5 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 5 Feb 2015 10:02:24 -0200 Subject: Packages repo cleanup: - Drop support for pfSense < 2 - Remove archive/, old files can be reached using git - Remove old and unused packages - Move stale files from config subdir to a package subdir --- config/archive/dspam/www/dspam-analysis-graph.php | 137 ---------------------- 1 file changed, 137 deletions(-) delete mode 100644 config/archive/dspam/www/dspam-analysis-graph.php (limited to 'config/archive/dspam/www/dspam-analysis-graph.php') diff --git a/config/archive/dspam/www/dspam-analysis-graph.php b/config/archive/dspam/www/dspam-analysis-graph.php deleted file mode 100644 index 67262564..00000000 --- a/config/archive/dspam/www/dspam-analysis-graph.php +++ /dev/null @@ -1,137 +0,0 @@ -addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -// setup the plotarea, legend and their layout -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 88 - ), - 5 - ) -); - -// link the legend with the plotares -$Legend->setPlotarea($Plotarea); - -// create the two datasets -$i = 0; -$spamds =& Image_Graph::factory('dataset'); -foreach($spam_day as $el){ - $spamds->addPoint(strval($period[$i]), intval($el)); - $i++; -} - -$i = 0; -$hamds =& Image_Graph::factory('dataset'); -foreach($nonspam_day as $el){ - $hamds->addPoint(strval($period[$i]), intval($el)); - $i++; -} - -// set the name/title of each dataset -$spamds->setName('SPAM'); -$hamds->setName('Good'); - -// put each dataset in a singel ds array -$Datasets = array($spamds, $hamds); - -// create the plot as line chart using the dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Line', array($Datasets,'normal')); - -// set a line color -$LineArray =& Image_Graph::factory('Image_Graph_Line_Array'); -$LineArray->addColor('red'); -$LineArray->addColor('green'); - -// set a standard line style -$Plot->setLineStyle($LineArray); - -/* set axis labels */ -$XAxis =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$XAxis->setTitle("{$FORM['x_label']}"); -$YAxis =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$YAxis->setTitle('Number of Messages', 'vertical'); - -// output the Graph -$Graph->done(); - -function &ReadParse($URI = "") { - if ($URI == "") { - return NULL; - } - - $pairs = preg_split('/&/', $URI); - $FORM = array(); - - foreach($pairs as $pair){ - list($name, $value) = preg_split('/\=/', $pair); - $pattern = '/%([a-fA-F0-9][a-fA-F0-9])/'; - - $name = preg_replace('/\+/', ' ', $name); - $name = preg_replace_callback( - $pattern, - create_function( - '$matches', - 'return pack("C", hexdec($matches[1]));' - ), - $name - ); - - $value = preg_replace('/\+/', ' ', $value); - $value = preg_replace_callback( - $pattern, - create_function( - '$matches', - 'return pack("C", hexdec($matches[1]));' - ), - $value - ); - - $FORM[$name] = $value; - } // end foreach - - return $FORM; -} -?> -- cgit v1.2.3