You can subscribe to this list here.
2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
From: <wis...@us...> - 2017-10-06 19:57:55
|
Revision: 13299 http://sourceforge.net/p/xoops/svn/13299 Author: wishcraft Date: 2017-10-06 19:57:52 +0000 (Fri, 06 Oct 2017) Log Message: ----------- GeoSpatial Places API - Version 2.3.1! Added Paths: ----------- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/.htaccess Added: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/.htaccess =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/.htaccess (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/.htaccess 2017-10-06 19:57:52 UTC (rev 13299) @@ -0,0 +1,11 @@ +RewriteEngine On +RewriteRule ^v([0-9]{1,2})/([0-9a-zA-Z\ \(\)\-\,\:]+)/([0-9a-zA-Z\ \(\)\-\,\:]+)/([0-9\.]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&place=$3&radius=$4&output=$5 [L,NC,QSA] +RewriteRule ^v([0-9]{1,2})/([0-9a-zA-Z\ \(\)\-\,\:]+)/([0-9a-zA-Z\ \(\)\-\,\:]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&place=$3&output=$4 [L,NC,QSA] +RewriteRule ^v([0-9]{1,2})/(nearby|exactly)/([0-9\.\-]+)/([0-9\.\-]+)/([0-9\.]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&latitude=$3&longitude=$4&radius=$5&output=$6 [L,NC,QSA] +RewriteRule ^v([0-9]{1,2})/(list|maps|details)/([a-zA-Z0-9\ \(\)\-\,]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&place=$3&output=$4 [L,NC,QSA] +RewriteRule ^v([0-9]{1,2})/(address)/([0-9a-z\-\,\ ]+)/(.*?)/([0-9\.]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&type=$3&address=$4&radius=$5&output=$6 [L,NC,QSA] +RewriteRule ^v([0-9]{1,2})/(address)/([0-9a-z\-\,\ ]+)/(.*?)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&type=$3&address=$4&output=$5 [L,NC,QSA] +RewriteRule ^v([0-9]{1,2})/(address)/(.*?)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&address=$3&output=$4 [L,NC,QSA] +RewriteRule ^v([0-9]{1,2})/(venues)/([0-9a-z\-\,\ ]+)/([0-9a-zA-Z\ \(\)\-\,\:]+)/([0-9\.]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&type=$3&place=$4&radius=$5&output=$6 [L,NC,QSA] +RewriteRule ^v([0-9]{1,2})/(venues)/([0-9a-z\-\,\ ]+)/([0-9a-zA-Z\ \(\)\-\,\:]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&type=$3&place=$4&output=$5 [L,NC,QSA] + Property changes on: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/.htaccess ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property |
From: <wis...@us...> - 2017-10-06 12:32:47
|
Revision: 13297 http://sourceforge.net/p/xoops/svn/13297 Author: wishcraft Date: 2017-10-06 12:32:45 +0000 (Fri, 06 Oct 2017) Log Message: ----------- resubmit places.xoops.org Modified Paths: -------------- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/json.createdatabase.php *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/page_tablescreate.php Modified: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/json.createdatabase.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/json.createdatabase.php 2017-10-06 12:11:17 UTC (rev 13296) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/json.createdatabase.php 2017-10-06 12:32:45 UTC (rev 13297) @@ -59,5 +59,5 @@ $html = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'dbreport.html'); $html .= "<ul style=\"list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;\"><il><h3 style=\"font-size: 1.44812em;\">".$files[0] . "</h3></li>" . $dbm->report() . "</ul>\n"; file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'dbreport.html', $html); - echo json_encode(array('dbreport' => $html, 'buttons' => ' ', 'leftsql' => $leftsql, 'totalsql' => $leftsql+$ransql, 'endmsg' => 'Still: ' . number_format((($leftsql-$ransql-1)/($leftsql+$ransql))/20, 2) . '% too process!')); + echo json_encode(array('dbreport' => $html, 'buttons' => ' ', 'leftsql' => $leftsql, 'totalsql' => $leftsql+$ransql, 'endmsg' => 'Still: ' . number_format((100-($ransql-1/($leftsql+$ransql))/20), 2) . '% too process!')); } \ No newline at end of file Modified: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/page_tablescreate.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/page_tablescreate.php 2017-10-06 12:11:17 UTC (rev 13296) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/page_tablescreate.php 2017-10-06 12:32:45 UTC (rev 13297) @@ -72,7 +72,8 @@ }); } updateDiv(); - setInterval(updateDiv, 24); + setInterval(updateDiv, 169); + $('#buttons').html(' '); }); </script> <div class=\"alert alert-success\"><h2><span class=\"fa fa-check text-success\" id='leftsql'> </span> / <span class=\"fa fa-check text-success\" id='totalsql'> </span> ~ <span class=\"text-success\" id='endmsg'> </span></h2></div> |
From: <wis...@us...> - 2017-10-06 12:11:20
|
Revision: 13296 http://sourceforge.net/p/xoops/svn/13296 Author: wishcraft Date: 2017-10-06 12:11:17 +0000 (Fri, 06 Oct 2017) Log Message: ----------- resubmit places.xoops.org Modified Paths: -------------- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/class/dbmanager.php *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/json.createdatabase.php *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/page_tablescreate.php *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/sql/dbreport.html Modified: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/class/dbmanager.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/class/dbmanager.php 2017-10-06 09:21:13 UTC (rev 13295) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/class/dbmanager.php 2017-10-06 12:11:17 UTC (rev 13296) @@ -123,15 +123,15 @@ } elseif ($prefixed_query[1] === 'INSERT INTO') { if ($this->db->query($prefixed_query[0]) != false) { if (!isset($this->s_tables['insert'][$table])) { - $this->s_tables['insert'][$table] = 1; + $this->f_tables['insert'][$table] = $this->db->getAffectedRows(); } else { - $this->s_tables['insert'][$table]++; + $this->f_tables['insert'][$table]=$this->f_tables['insert'][$table]+$this->db->getAffectedRows(); } } else { if (!isset($this->f_tables['insert'][$table])) { - $this->f_tables['insert'][$table] = 1; + $this->f_tables['insert'][$table] = $this->db->getAffectedRows(); } else { - $this->f_tables['insert'][$table]++; + $this->f_tables['insert'][$table]=$this->f_tables['insert'][$table]+$this->db->getAffectedRows(); } } } elseif ($prefixed_query[1] === 'ALTER TABLE') { @@ -180,7 +180,7 @@ $commands = array('create', 'insert', 'alter', 'drop'); $content = '<ul class="log">'; foreach ($commands as $cmd) { - if (!@empty($this->s_tables[$cmd])) { + if (isset($this->s_tables[$cmd])) { foreach ($this->s_tables[$cmd] as $key => $val) { $content .= '<li class="success">'; $content .= ($cmd !== 'insert') ? sprintf($this->successStrings[$cmd], $key) : sprintf($this->successStrings[$cmd], $val, $key); Modified: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/json.createdatabase.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/json.createdatabase.php 2017-10-06 09:21:13 UTC (rev 13295) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/json.createdatabase.php 2017-10-06 12:11:17 UTC (rev 13296) @@ -35,14 +35,22 @@ header('Content-type: application/json'); +$leftsql = $ransql = 0; $files = APILists::getFileListAsArray(__DIR__ . DIRECTORY_SEPARATOR . 'sql'); - foreach($files as $key => $file) - if (substr($file, strlen($file)-3,3) != 'sql') + if (substr($file, strlen($file)-3,3) != 'sql' && substr($file, strlen($file)-3,3) != 'ran') unset($files[$key]); + elseif (substr($file, strlen($file)-3,3) == 'sql') + $leftsql++; + elseif (substr($file, strlen($file)-3,3) == 'ran') + { + unset($files[$key]); + $ransql++; + } + sort($files, SORT_DESC); if (count($files) == 0) - echo json_encode(array('dbreport' => file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'dbreport.html'), 'buttons' => '<button class="btn btn-lg btn-success" type="button" accesskey="n" onclick="location.href=\'' . API_URL . '/install/page_siteinit.php\'"> Continue <span class="fa fa-caret-right"></span></button>')); + echo json_encode(array('dbreport' => file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'dbreport.html'), 'buttons' => '<button class="btn btn-lg btn-success" type="button" accesskey="n" onclick="location.href=\'' . API_URL . '/install/page_siteinit.php\'"> Continue <span class="fa fa-caret-right"></span></button>', 'leftsql' => $leftsql, 'totalsql' => $leftsql+$ransql, 'endmsg' => 'All SQL Executed - Goto bottom page and click continue!')); else { rename(__DIR__ . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . $files[0], __DIR__ . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . $files[0] . '.ran'); @@ -51,5 +59,5 @@ $html = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'dbreport.html'); $html .= "<ul style=\"list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;\"><il><h3 style=\"font-size: 1.44812em;\">".$files[0] . "</h3></li>" . $dbm->report() . "</ul>\n"; file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'dbreport.html', $html); - echo json_encode(array('dbreport' => $html, 'buttons' => ' ')); + echo json_encode(array('dbreport' => $html, 'buttons' => ' ', 'leftsql' => $leftsql, 'totalsql' => $leftsql+$ransql, 'endmsg' => 'Still: ' . number_format((($leftsql-$ransql-1)/($leftsql+$ransql))/20, 2) . '% too process!')); } \ No newline at end of file Modified: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/page_tablescreate.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/page_tablescreate.php 2017-10-06 09:21:13 UTC (rev 13295) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/page_tablescreate.php 2017-10-06 12:11:17 UTC (rev 13296) @@ -65,13 +65,17 @@ success: function(data) { $('#dbreport').html(data.dbreport); $('#buttons').html(data.buttons); + $('#leftsql').html(data.leftsql); + $('#totalsql').html(data.totalsql); + $('#endmsg').html(data.endmsg); } }); } updateDiv(); - setInterval(updateDiv, 442); + setInterval(updateDiv, 24); }); </script> +<div class=\"alert alert-success\"><h2><span class=\"fa fa-check text-success\" id='leftsql'> </span> / <span class=\"fa fa-check text-success\" id='totalsql'> </span> ~ <span class=\"text-success\" id='endmsg'> </span></h2></div> <div class=\"alert alert-success\"><span class=\"fa fa-check text-success\"></span> " . API_TABLES_CREATED . "</div><div class=\"well\" id=\"dbreport\"> </div>"; } Modified: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/sql/dbreport.html =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/sql/dbreport.html 2017-10-06 09:21:13 UTC (rev 13295) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/sql/dbreport.html 2017-10-06 12:11:17 UTC (rev 13296) @@ -1,297 +1,922 @@ -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania created.</li> -<li class="success">2 entries inserted to table g30__albania.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania.sql</h3></li><ul class="log"><li class="success">Table g3O__albania created.</li> +<li class="failure">Failed inserting 1973 entries to table g3O__albania.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania_address.sql</h3></li><ul class="log"><li class="success">Table g3O__albania_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__albania_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__albania_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania_details.sql</h3></li><ul class="log"><li class="success">Table g3O__albania_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania_states.sql</h3></li><ul class="log"><li class="success">Table g3O__albania_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__albania_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__albania_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__albania_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__albania_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">albania_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__albania_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria created.</li> -<li class="success">2 entries inserted to table g30__algeria.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria created.</li> +<li class="failure">Failed inserting 2264 entries to table g3O__algeria.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria_address.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria_details.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria_states.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__algeria_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">algeria_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__algeria_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra created.</li> -<li class="success">1 entries inserted to table g30__andorra.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra created.</li> +<li class="failure">Failed inserting 313 entries to table g3O__andorra.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra_address.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra_details.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra_states.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__andorra_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">andorra_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__andorra_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola created.</li> -<li class="success">2 entries inserted to table g30__angola.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola.sql</h3></li><ul class="log"><li class="success">Table g3O__angola created.</li> +<li class="failure">Failed inserting 4841 entries to table g3O__angola.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola_address.sql</h3></li><ul class="log"><li class="success">Table g3O__angola_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__angola_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__angola_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola_details.sql</h3></li><ul class="log"><li class="success">Table g3O__angola_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola_states.sql</h3></li><ul class="log"><li class="success">Table g3O__angola_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__angola_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__angola_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__angola_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__angola_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">angola_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__angola_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla created.</li> -<li class="success">1 entries inserted to table g30__anguilla.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla created.</li> +<li class="failure">Failed inserting 70 entries to table g3O__anguilla.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla_address.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla_details.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla_states.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">zimbabwe_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__anguilla_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">anguilla_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__anguilla_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda created.</li> -<li class="success">1 entries inserted to table g30__antiguaandbarbuda.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda created.</li> +<li class="failure">Failed inserting 266 entries to table g3O__antiguaandbarbuda.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_address.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_address.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_address_types.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_details.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_details.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_states.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_states.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_venues.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_venues_types.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__antiguaandbarbuda_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">antiguaandbarbuda_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__antiguaandbarbuda_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina.sql</h3></li><ul class="log"><li class="success">Table g30__argentina created.</li> -<li class="success">2 entries inserted to table g30__argentina.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina created.</li> +<li class="failure">Failed inserting 2138 entries to table g3O__argentina.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_address.sql</h3></li><ul class="log"><li class="success">Table g30__argentina_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_address.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_address_types.sql</h3></li><ul class="log"><li class="success">Table g30__argentina_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__argentina_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_details.sql</h3></li><ul class="log"><li class="success">Table g30__argentina_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_details.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_states.sql</h3></li><ul class="log"><li class="success">Table g30__argentina_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_states.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_venues.sql</h3></li><ul class="log"><li class="success">Table g30__argentina_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g30__argentina_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_venues_types.sql</h3></li><ul class="log"><li class="success">Table g30__argentina_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__argentina_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">argentina_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__argentina_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia.sql</h3></li><ul class="log"><li class="success">Table g30__armenia created.</li> -<li class="success">1 entries inserted to table g30__armenia.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia created.</li> +<li class="failure">Failed inserting 3219 entries to table g3O__armenia.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_address.sql</h3></li><ul class="log"><li class="success">Table g30__armenia_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_address.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_address_types.sql</h3></li><ul class="log"><li class="success">Table g30__armenia_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__armenia_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_details.sql</h3></li><ul class="log"><li class="success">Table g30__armenia_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_details.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_states.sql</h3></li><ul class="log"><li class="success">Table g30__armenia_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_states.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_venues.sql</h3></li><ul class="log"><li class="success">Table g30__armenia_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g30__armenia_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_venues_types.sql</h3></li><ul class="log"><li class="success">Table g30__armenia_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__armenia_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">armenia_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__armenia_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands created.</li> -<li class="success">1 entries inserted to table g30__ashmoreandcartierislands.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands created.</li> +<li class="failure">Failed inserting 10 entries to table g3O__ashmoreandcartierislands.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_address.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_address.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_address_types.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_details.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_details.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_states.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_states.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_venues.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_venues_types.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__ashmoreandcartierislands_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">ashmoreandcartierislands_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__ashmoreandcartierislands_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia.sql</h3></li><ul class="log"><li class="success">Table g30__australia created.</li> -<li class="success">2 entries inserted to table g30__australia.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia.sql</h3></li><ul class="log"><li class="success">Table g3O__australia created.</li> +<li class="failure">Failed inserting 9134 entries to table g3O__australia.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_address.sql</h3></li><ul class="log"><li class="success">Table g30__australia_address created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_address.sql</h3></li><ul class="log"><li class="success">Table g3O__australia_address created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_address_types.sql</h3></li><ul class="log"><li class="success">Table g30__australia_address_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_address_types.sql</h3></li><ul class="log"><li class="success">Table g3O__australia_address_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__australia_address_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_address_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__australia_address_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_details.sql</h3></li><ul class="log"><li class="success">Table g30__australia_details created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_details.sql</h3></li><ul class="log"><li class="success">Table g3O__australia_details created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_states.sql</h3></li><ul class="log"><li class="success">Table g30__australia_states created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_states.sql</h3></li><ul class="log"><li class="success">Table g3O__australia_states created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_venues.sql</h3></li><ul class="log"><li class="success">Table g30__australia_venues created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_venues.sql</h3></li><ul class="log"><li class="success">Table g3O__australia_venues created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g30__australia_venues_photos created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_venues_photos.sql</h3></li><ul class="log"><li class="success">Table g3O__australia_venues_photos created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_venues_types.sql</h3></li><ul class="log"><li class="success">Table g30__australia_venues_types created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_venues_types.sql</h3></li><ul class="log"><li class="success">Table g3O__australia_venues_types created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g30__australia_venues_types_links created.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">australia_venues_types_links.sql</h3></li><ul class="log"><li class="success">Table g3O__australia_venues_types_links created.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">austria.sql</h3></li><ul class="log"><li class="success">Table g30__austria created.</li> -<li class="success">2 entries inserted to table g30__austria.</li> +<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">austria.sql</h3></li><ul class="log"><li class="success">Table g3O__austria created.</li> +<li class="failure">Failed inserting 10053 entries to table g3O__austria.</li> </ul></ul> -<ul style="list-style-bullet: none; float: left; width: 32%; padding: 4px; margin: 3px;"><il><h3 style="font-size: 1.44812em;">austria_address.sql</h3></li><ul class="log"><li class="success">Table g30__austria_address created.</li> +<ul style="list-style-bullet: none; float: le... [truncated message content] |
From: <wis...@us...> - 2017-10-06 09:17:14
|
Revision: 13294 http://sourceforge.net/p/xoops/svn/13294 Author: wishcraft Date: 2017-10-06 09:17:10 +0000 (Fri, 06 Oct 2017) Log Message: ----------- resubmit places.xoops.org Removed Paths: ------------- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/README.md *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/apiconfig.php *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/class/ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/crons/ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/data/ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/functions.php *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/help.php *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/include/ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/index.php *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/install/ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/jquery/ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/style.css *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/verify.php Deleted: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/README.md =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/README.md 2017-10-06 07:04:29 UTC (rev 13293) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/README.md 2017-10-06 09:17:10 UTC (rev 13294) @@ -1,34 +0,0 @@ -# Chronolabs Cooperative ~ GeoSpatial Places Lookups API - -## Author: Simon Antony Roberts <wis...@us...> - -This API is a Geospatial service provided by PHP7.0 - it utilises file caches as well as a mysqli database interface to provide and provision both locality keys as well as country and continent keys. - -# SEO Friendly URL - Apache Module Rewrite - -This goes in your API_ROOT_PATH/.htaccess file - - RewriteEngine On - RewriteRule ^v([0-9]{1,2})/([0-9a-zA-Z\ \(\)\-\,\:]+)/([0-9a-zA-Z\ \(\)\-\,\:]+)/([0-9\.]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&place=$3&radius=$4&output=$5 [L,NC,QSA] - RewriteRule ^v([0-9]{1,2})/([0-9a-zA-Z\ \(\)\-\,\:]+)/([0-9a-zA-Z\ \(\)\-\,\:]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&place=$3&output=$4 [L,NC,QSA] - RewriteRule ^v([0-9]{1,2})/(nearby|exactly)/([0-9\.\-]+)/([0-9\.\-]+)/([0-9\.]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&latitude=$3&longitude=$4&radius=$5&output=$6 [L,NC,QSA] - RewriteRule ^v([0-9]{1,2})/(list|maps|details)/([a-zA-Z0-9\ \(\)\-\,]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&place=$3&output=$4 [L,NC,QSA] - RewriteRule ^v([0-9]{1,2})/(address)/([0-9a-z\-\,\ ]+)/(.*?)/([0-9\.]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&type=$3&address=$4&radius=$5&output=$6 [L,NC,QSA] - RewriteRule ^v([0-9]{1,2})/(address)/([0-9a-z\-\,\ ]+)/(.*?)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&type=$3&address=$4&output=$5 [L,NC,QSA] - RewriteRule ^v([0-9]{1,2})/(address)/(.*?)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&address=$3&output=$4 [L,NC,QSA] - RewriteRule ^v([0-9]{1,2})/(venues)/([0-9a-z\-\,\ ]+)/([0-9a-zA-Z\ \(\)\-\,\:]+)/([0-9\.]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&type=$3&place=$4&radius=$5&output=$6 [L,NC,QSA] - RewriteRule ^v([0-9]{1,2})/(venues)/([0-9a-z\-\,\ ]+)/([0-9a-zA-Z\ \(\)\-\,\:]+)/(raw|html|serial|json|xml).api ./index.php?version=$1&country=$2&type=$3&place=$4&output=$5 [L,NC,QSA] - -# Installing API - -Copy the contents of this distribution to your visually routable path via http(s) etc. Then poll the path required and run the install; - -it requires apache2, nixi, iis etc and best with php5+; - -# Cronjobs/Scheduled Tasks - -There is a couple of cronjobs to be set they are the following after running: $ crontab -e - - */15 * * * * /usr/bin/php -q /var/www/places.snails.email/crons/align-postcode-states.php - */25 * * * * /usr/bin/php -q /var/www/places.snails.email/crons/mining-localities.php - */15 */6 * * * /usr/bin/php -q /var/www/places.snails.email/crons/updating-details.php Deleted: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/apiconfig.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/apiconfig.php 2017-10-06 07:04:29 UTC (rev 13293) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/apiconfig.php 2017-10-06 09:17:10 UTC (rev 13294) @@ -1,95 +0,0 @@ -<?php -/** - * Chronolabs REST Geospatial Places Services API - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright Chronolabs Cooperative http://snails.email - * @license GNU GPL 3 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package api - * @since 2.0.1 - * @author Simon Roberts <wis...@us...> - * @subpackage places - * @description Geospatial Places Services API - * @see http://internetfounder.wordpress.com - * @see http://sourceoforge.net/projects/chronolabsapis - * @see https://github.com/Chronolabs-Cooperative/Places-API-PHP - */ - - -if (!is_file(__DIR__ . DIRECTORY_SEPARATOR . 'mainfile.php') || !is_file(__DIR__ . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'license.php')) -{ - header('Location: ' . "./install"); - exit(0); -} - -require_once __DIR__ . DIRECTORY_SEPARATOR . 'mainfile.php'; - -/** - * Paths - */ -$pu = parse_url($_SERVER['REQUEST_URI']); -$source = (isset($_SERVER['HTTPS'])?'https://':'http://').strtolower($_SERVER['HTTP_HOST']).$pu['path']; -unset($pu); -define('PLACES_URL', $source); -define('API_ROOT_PATH', __DIR__); -define('API_CACHE_PATH', DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'places' . DIRECTORY_SEPARATOR . 'caches'); -define('API_TMP_PATH', DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'places'); - -/** - * Cronjob Constants and Defines - */ -define('API_CRON_NUMBER_COUNTRIES', 7); -define('API_CRON_NUMBER_REGIONS', 250); - -/** - * Times && Limits - */ -define('API_RADIUS_DEFAULT', 0.469); -define('API_GOOGLE_PAGES_RESULTS', 13); -define('API_CACHE_SECONDS', 8444); -define('MAXIMUM_QUERIES', 25); -ini_set('memory_limit', '128M'); - -/** - * Keys & Identify Strings - */ -define('API_GOOGLE_KEY','AIzaSyD0tstaeCtH0gugLJUeYcUSUT_TdXL24Uo'); // Get from: https://developers.google.com/places/web-service/get-api-key = API_GOOGLE_KEY -define('API_PLACES_FIELDS', 'Address|Distance|RegionName|mapref_latitude|mapref_longitude|Latitude_Float|Longitude_Float|Altitude_Feet|Altitude_Meters|key'); -define('API_COUNTRY_FIELDS', 'Country|ISO2|FIPS104|ISO3|ISON|TLD|Capital|Continent|NationalitySingular|NationalityPlural|Currency|CurrencyCode|Population|Records|Updates|Places|Details|key|distance'); -define('API_CONTINENT_FIELDS', 'Continent|key|Population|Records|Places|Details|Updates'); -define('API_VENUE_FIELDS','key|Name|Icon|Id|Reference|Longitude|Latitude|View_NE_Longitude|View_NE_Latitude|View_SW_Longitude|View_SW_Latitude|Vicinity'); -define('API_ADDRESS_FIELDS','key|Unit|Building|Street|Suburb|State|Country|Country_ISO2|Postcode|Council|Longitude|Latitude|View_NE_Longitude|View_NE_Latitude|View_SW_Longitude|View_SW_Latitude|Formatted'); - -/** - * Include libraries - */ -require_once __DIR__ . DIRECTORY_SEPARATOR . 'functions.php'; -require_once __DIR__ . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'file' . DIRECTORY_SEPARATOR . 'apifile.php'; -require_once __DIR__ . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'apicache.php'; - -/** - * Opens Access Origin Via networking Route NPN - */ -header('Access-Control-Allow-Origin: *'); -header('Origin: *'); - -/** - * Turns of GZ Lib Compression for Document Incompatibility - */ -ini_set("zlib.output_compression", 'Off'); -ini_set("zlib.output_compression_level", -1); - -/** - * - * @var constants - */ -define("API_FILE_IO_PEERS", __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'peers.diz'); -define("API_FILE_IO_DOMAINS", __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'domains.diz'); -define("API_FILE_IO_FOOTER", __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'api-localhost.html'); -?> \ No newline at end of file Deleted: *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/functions.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/functions.php 2017-10-06 07:04:29 UTC (rev 13293) +++ *.xoops.org (Subdomain APIs & Sites)/places.xoops.org/functions.php 2017-10-06 09:17:10 UTC (rev 13294) @@ -1,2079 +0,0 @@ -<?php -/** - * Chronolabs REST Geospatial Places Services API - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright Chronolabs Cooperative http://snails.email - * @license GNU GPL 3 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package api - * @since 2.0.1 - * @author Simon Roberts <wis...@us...> - * @subpackage places - * @description Geospatial Places Services API - * @see http://internetfounder.wordpress.com - * @see http://sourceoforge.net/projects/chronolabsapis - * @see https://github.com/Chronolabs-Cooperative/Places-API-PHP - */ - - -if (!function_exists("whitelistGetIP")) { - - /* function whitelistGetIPAddy() - * - * provides an associative array of whitelisted IP Addresses - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @return array - */ - function whitelistGetIPAddy() { - return array_merge(whitelistGetNetBIOSIP(), file(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'whitelist.txt')); - } -} - -if (!function_exists("whitelistGetNetBIOSIP")) { - - /* function whitelistGetNetBIOSIP() - * - * provides an associative array of whitelisted IP Addresses base on TLD and NetBIOS Addresses - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @return array - */ - function whitelistGetNetBIOSIP() { - $ret = array(); - foreach(file(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'whitelist-domains.txt') as $domain) { - $ip = gethostbyname($domain); - $ret[$ip] = $ip; - } - return $ret; - } -} - -if (!function_exists("whitelistGetIP")) { - - /* function whitelistGetIP() - * - * get the True IPv4/IPv6 address of the client using the API - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @param $asString boolean Whether to return an address or network long integer - * - * @return mixed - */ - function whitelistGetIP($asString = true){ - // Gets the proxy ip sent by the user - $proxy_ip = ''; - if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { - $proxy_ip = $_SERVER['HTTP_X_FORWARDED_FOR']; - } else - if (!empty($_SERVER['HTTP_X_FORWARDED'])) { - $proxy_ip = $_SERVER['HTTP_X_FORWARDED']; - } else - if (! empty($_SERVER['HTTP_FORWARDED_FOR'])) { - $proxy_ip = $_SERVER['HTTP_FORWARDED_FOR']; - } else - if (!empty($_SERVER['HTTP_FORWARDED'])) { - $proxy_ip = $_SERVER['HTTP_FORWARDED']; - } else - if (!empty($_SERVER['HTTP_VIA'])) { - $proxy_ip = $_SERVER['HTTP_VIA']; - } else - if (!empty($_SERVER['HTTP_X_COMING_FROM'])) { - $proxy_ip = $_SERVER['HTTP_X_COMING_FROM']; - } else - if (!empty($_SERVER['HTTP_COMING_FROM'])) { - $proxy_ip = $_SERVER['HTTP_COMING_FROM']; - } - if (!empty($proxy_ip) && $is_ip = preg_match('/^([0-9]{1,3}.){3,3}[0-9]{1,3}/', $proxy_ip, $regs) && count($regs) > 0) { - $the_IP = $regs[0]; - } else { - $the_IP = $_SERVER['REMOTE_ADDR']; - } - - $the_IP = ($asString) ? $the_IP : ip2long($the_IP); - return $the_IP; - } -} - -if (!function_exists("randomPlacesKey")) { - - /* function randomPlacesKey() - * - * Get a random forensic identify key for a place from the database - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @return string(32) - */ - function randomPlacesKey() - { - $sql = "SELECT * FROM `".$GLOBALS['APIDB']->prefix("countries") . "` WHERE `Records` > 1000 ORDER BY RAND() LIMIT 1 "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - $country = $GLOBALS['APIDB']->fetchArray($result); - $sql = "SELECT concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key` FROM `" . $GLOBALS['APIDB']->prefix($country['Table']) . "` ORDER BY RAND() LIMIT 1 "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - if (list($key) = $GLOBALS['APIDB']->fetchRow($result)) - return $key; - } - $ret = array(); - } - } -} - -if (!function_exists("randomGeoPlace")) { - - /* function randomPlacesKey() - * - * Get a random forensic identify key for a place from the database - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @return string(32) - */ - function randomGeoPlace() - { - $sql = "SELECT * FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE `Records` > 1000 ORDER BY RAND() LIMIT 1 "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - $country = $GLOBALS['APIDB']->fetchArray($result); - $sql = "SELECT * FROM `" . $GLOBALS['APIDB']->prefix($country['Table']) . "` ORDER BY RAND() LIMIT 1 "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - if ($place = $GLOBALS['APIDB']->fetchArray($result)) - return array('country' => $country['Country'], 'iso3' => $country['ISO3'], 'iso2' => $country['ISO2'], 'region' => $place['RegionName']); - } - } - return false; - } -} -if (!function_exists("randomGeoLocation")) { - - /* function randomGeoLocation() - * - * Get a random latitude & longitude for a place from the database - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @return array - */ - function randomGeoLocation() - { - $sql = "SELECT * FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE `Records` > 1000 ORDER BY RAND() LIMIT 1 "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - $country = $GLOBALS['APIDB']->fetchArray($result); - $sql = "SELECT * FROM `" . $GLOBALS['APIDB']->prefix($country['Table']) . "` ORDER BY RAND() LIMIT 1 "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - if ($place = $GLOBALS['APIDB']->fetchArray($result)) - return array('latitude'=>$place['Latitude_Float'], 'longitude' => $place['Longitude_Float']); - } - $ret = array('latitude'=> 0, 'longitude' => 0); - } - } -} - -if (!function_exists("findPlace")) { - - /* function findPlace() - * - * Function that finds a location(s) based in the information passed to the URL - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @param $country string Country Name, ISO2 or ISO3 or keyword 'Random' for a country to search - * @param $place string Name of place or component of name of places to search for or keyword 'Random' - * @param $format string API Output mode (JSON, XML, SERIAL, HTML, RAW) - * @param $return integer Number of Result to Limit the selection and return of the API - * - * @return array - */ - function findPlace($country = '', $place = '', $format = 'json', $radius = 1) - { - if (empty($radius) || $radius < 1) - $radius = API_RADIUS_DEFAULT; - - session_start(); - if (!in_array(whitelistGetIP(true), whitelistGetIPAddy())) { - if (isset($_SESSION['places']['queries']['time'])) { - if ($_SESSION['places']['queries']['time']>time()) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - } elseif (!isset($_SESSION['places']['queries']['time'])) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - if ($_SESSION['places']['queries']['number']>MAXIMUM_QUERIES) { - header("HTTP/1.0 404 Not Found"); - exit; - } - $_SESSION['places']['queries']['number']++; - } - - $numberof = 0; - $sql = ''; - $ret = array(); - if (strlen($country)>3&&strtolower($country)!='list'&&strtolower($country)!='random') { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE lower(`Country`) LIKE '".strtolower($country)."' GROUP BY `CountryID` ORDER BY RAND() LIMIT 1"; - - } elseif (strlen($country)>3&&strtolower($country)=='random') { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` GROUP BY `CountryID` ORDER BY RAND() LIMIT 1"; - - } elseif (strlen($country)>3&&strtolower($country)=='list') { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` GROUP BY `CountryID` ORDER BY `Country` ASC "; - - } elseif (strlen($country)==3) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE lower(`ISO3`) LIKE '".strtolower($country)."' GROUP BY `CountryID` ORDER BY RAND() LIMIT 1 "; - } elseif (strlen($country)==2) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE lower(`ISO2`) LIKE '".strtolower($country)."' GROUP BY `CountryID` ORDER BY RAND() LIMIT 1 "; - } elseif (strlen($country)!=2 && strlen($country)!=3) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE lower(`Country`) LIKE '%".strtolower($country)."%' GROUP BY `CountryID` ORDER BY RAND() LIMIT 1 "; - } - $numberof=$seconds=$start=$end=0; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - while($country = $GLOBALS['APIDB']->fetchArray($result)) { - $sql = "SELECT count(*) as records FROM `" . $country['Table'] . "`"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $records = $GLOBALS['APIDB']->fetchArray($resultb); - $country['records'] = $records['records']; - } else - $country['records'] = 0 ; - $table = $country['Table']; - if ($format!='xml') - $ret['countries'][$table] = strippedArray($country, explode('|', API_COUNTRY_FIELDS)); - else - $ret['countries'][$table] = strippedArray($country, explode('|', API_COUNTRY_FIELDS)); - - if (strtolower($place)!='random') { - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $country['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key` FROM `" . $GLOBALS['APIDB']->prefix($table) . "` WHERE LOWER(`RegionName`) LIKE '" . strtolower($place) . "%' ORDER BY RAND()"; - } elseif (strtolower($place) == 'random' && strtolower($country) == 'random') - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $country['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key` FROM `" . $GLOBALS['APIDB']->prefix($table) . "` ORDER BY RAND()"; - elseif (strtolower($place) == 'random' && strtolower($country) != 'random') { - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $country['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key` FROM `" . $GLOBALS['APIDB']->prefix($table) . "` ORDER BY RAND()"; - } else { - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $country['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key` FROM `" . $GLOBALS['APIDB']->prefix($table) . "` WHERE LOWER(`RegionName`) LIKE '%" . strtolower($place) . "%' ORDER BY RAND()"; - } - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - while ($region = $GLOBALS['APIDB']->fetchArray($resultb)) { - if ($seconds==0) - $seconds = 120; - elseif ($end!=0&&$start!=0) - $seconds = $seconds + ($end - $start * 3); - $start = microtime(true); - set_time_limit($seconds); - if (strpos($region['RegionName'], ',')) { - $parts = explode(',',$region['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $region['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($region['RegionName'])); - if ($format!='xml') - $ret['places'][$table][$region['key']] = strippedArray($region, explode('|', API_PLACES_FIELDS)); - else - $ret['places'][$table][$key] = strippedArray($region, explode('|', API_PLACES_FIELDS)); - $numberof++; - - if ($radius != API_RADIUS_DEFAULT) - { - $latitude = $region['Latitude_Float']; - $longitude = $region['Longitude_Float']; - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $country['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, 3956 * 2 * ASIN(SQRT(POWER(SIN((" . abs($latitude) . " - abs(`Latitude_Float`)) * pi() / 180 / 2), 2) + COS(" . abs($latitude) . " * pi() / 180 ) * COS(abs(`Latitude_Float`) * pi() / 180) * POWER(SIN((" . $longitude . " - `Longitude_Float`) * pi() / 180 / 2), 2) )) as `Distance` FROM `" . $GLOBALS['APIDB']->prefix($table) . "` HAVING `Distance` <= ".$radius." ORDER BY `Distance`"; - $ret['search']['countries']++; - unset($resultb); - if ($resultc = $GLOBALS['APIDB']->queryF($sql)) { - while ($nearby = $GLOBALS['APIDB']->fetchArray($resultc)) { - if (strpos($nearby['RegionName'], ',')) { - $parts = explode(',',$nearby['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $nearby['RegionName'] = implode(' ', $parts); - } - $keyb = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($nearby['RegionName'])); - if ($format!='xml') - $ret['places'][$table][$region['key']]['nearby'][$keyb] = strippedArray($nearby, explode('|',API_PLACES_FIELDS)); - else - $ret['places'][$table][$key]['nearby'][$keyb] = strippedArray($nearby, explode('|',API_PLACES_FIELDS)); - } - } - } - $end = microtime(true); - } - } - } - } - return $ret; - } -} - - - -if (!function_exists("findNearby")) { - - /* function findNearby() - * - * Function that finds a location(s) near a latitude & longitude - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @param $latitude float Latitude to search for places near by - * @param $longitude float Longitude to search for places near by - * @param $radius integer Radius that the search bounded by in kilometers (integer only) - * @param $format string API Output mode (JSON, XML, SERIAL, HTML, RAW) - * - * @return array - */ - function findNearby($latitude = 0, $longitude = 0, $radius = 0, $format = 'json') - { - session_start(); - if (!in_array(whitelistGetIP(true), whitelistGetIPAddy())) { - if (isset($_SESSION['places']['queries']['time'])) { - if ($_SESSION['places']['queries']['time']>time()) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - } elseif (!isset($_SESSION['places']['queries']['time'])) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - if ($_SESSION['places']['queries']['number']>MAXIMUM_QUERIES) { - header("HTTP/1.0 404 Not Found"); - exit; - } - $_SESSION['places']['queries']['number']++; - } - - $ret = array(); - $ret['search']['places'] = $ret['search']['countries'] = 0; - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` GROUP BY `CountryID` ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - while($country = $GLOBALS['APIDB']->fetchArray($result)) { - $table = $country['Table']; - $sql = "SELECT count(*) as records FROM `" . $GLOBALS['APIDB']->prefix($table) . "`"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $records = $GLOBALS['APIDB']->fetchArray($resultb); - $country['records'] = $records['records']; - } else - $country['records'] = 0 ; - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $country['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, 3956 * 2 * ASIN(SQRT(POWER(SIN((" . abs($latitude) . " - abs(`Latitude_Float`)) * pi() / 180 / 2), 2) + COS(" . abs($latitude) . " * pi() / 180 ) * COS(abs(`Latitude_Float`) * pi() / 180) * POWER(SIN((" . $longitude . " - `Longitude_Float`) * pi() / 180 / 2), 2) )) as `Distance` FROM `" . $GLOBALS['APIDB']->prefix($table) . "` HAVING `Distance` <= ".$radius." ORDER BY `Distance`"; - $ret['search']['countries']++; - unset($resultb); - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - while ($place = $GLOBALS['APIDB']->fetchArray($resultb)) { - if ($format!='xml') - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - else - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - if (strpos($place['RegionName'], ',')) { - $parts = explode(',',$place['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $place['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($place['RegionName'])); - if ($format!='xml') - $ret['results']['places'][$table][$place['key']] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - else - $ret['results']['places'][$table][$key] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - $ret['search']['places']++; - } - } - } - } - $ret['search']['type'] = 'nearby'; - return $ret; - } -} - - - - -if (!function_exists("findExactly")) { - - /* function findNearby() - * - * Function that finds a location(s) near a latitude & longitude - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @param $latitude float Latitude to search for places near by - * @param $longitude float Longitude to search for places near by - * @param $radius integer Radius that the search bounded by in kilometers (integer only) - * @param $format string API Output mode (JSON, XML, SERIAL, HTML, RAW) - * - * @return array - */ - function findExactly($latitude = 0, $longitude = 0, $radius = 0, $format = 'json') - { - session_start(); - if (!in_array(whitelistGetIP(true), whitelistGetIPAddy())) { - if (isset($_SESSION['places']['queries']['time'])) { - if ($_SESSION['places']['queries']['time']>time()) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - } elseif (!isset($_SESSION['places']['queries']['time'])) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - if ($_SESSION['places']['queries']['number']>MAXIMUM_QUERIES) { - header("HTTP/1.0 404 Not Found"); - exit; - } - $_SESSION['places']['queries']['number']++; - } - - $ret = array(); - $places = $ret['search']['countries'] = $ret['search']['places'] = 0; - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` GROUP BY `CountryID` ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - while($country = $GLOBALS['APIDB']->fetchArray($result)) { - $table = $country['Table']; - $sql = "SELECT count(*) as records FROM `" . $GLOBALS['APIDB']->prefix($table) . "`"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $records = $GLOBALS['APIDB']->fetchArray($resultb); - $country['records'] = $records['records']; - } else - $country['records'] = 0 ; - $ret['search']['countries']++; - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $country['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, 3956 * 2 * ASIN(SQRT(POWER(SIN((" . abs($latitude) . " - abs(`Latitude_Float`)) * pi() / 180 / 2), 2) + COS(" . abs($latitude) . " * pi() / 180 ) * COS(abs(`Latitude_Float`) * pi() / 180) * POWER(SIN((" . $longitude . " - `Longitude_Float`) * pi() / 180 / 2), 2) )) as `Distance` FROM `" . $GLOBALS['APIDB']->prefix($table) . "` WHERE `Latitude_Float` >= ".($latitude - (111.32 * ($radius / 1000)))." AND `Longitude_Float` >= ".($longitude - (111.32 * ($radius / 1000)))." AND `Latitude_Float` <= ".($latitude + (111.32 * ($radius / 1000)))." AND `Longitude_Float` <= ".($longitude + (111.32 * ($radius / 1000)))." ORDER BY `Distance`"; - unset($resultb); - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - while ($place = $GLOBALS['APIDB']->fetchArray($resultb)) { - if ($format!='xml') - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - else - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - if (strpos($place['RegionName'], ',')) { - $parts = explode(',',$place['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $place['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($place['RegionName'])); - if ($format!='xml') - $ret['results']['places'][$table][$place['key']] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - else - $ret['results']['places'][$table][$key] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - $ret['search']['places']++; - } - } - } - } - $ret['search']['type'] = 'exactly'; - return $ret; - } -} - -if (!function_exists("findKey")) { - - /* function findKey() - * - * Function that reverse lookups a forensic identifier MD6 of country or region and return one or more locations - * @author Simon Roberts (Chronolabs) simon@snails.email - * - * @param $key string the MD5 32 Character Checksum for the place or country to lookup - * @param $radius integer Radius that the search bounded by in kilometers (integer only) - * @param $format string API Output mode (JSON, XML, SERIAL, HTML, RAW) - * - * @return array - */ - function findKey($key = '', $radius = 0, $format = 'json') - { - - session_start(); - if (!in_array(whitelistGetIP(true), whitelistGetIPAddy())) { - if (isset($_SESSION['places']['queries']['time'])) { - if ($_SESSION['places']['queries']['time']>time()) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - } elseif (!isset($_SESSION['places']['queries']['time'])) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - if ($_SESSION['places']['queries']['number']>MAXIMUM_QUERIES) { - header("HTTP/1.0 404 Not Found"); - exit; - } - $_SESSION['places']['queries']['number']++; - } - - error_reporting(E_ERROR); - session_start(); - if (isset($_SESSION['places']['queries']['time'])) { - if ($_SESSION['places']['queries']['time']>time()) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - } elseif (!isset($_SESSION['places']['queries']['time'])) { - $_SESSION['places']['queries']['number'] = 0; - $_SESSION['places']['queries']['time'] = time()+3600; - } - if ($_SESSION['places']['queries']['number']>MAXIMUM_QUERIES) { - header("HTTP/1.0 404 Not Found"); - exit; - } - $_SESSION['places']['queries']['number']++; - - $sql = ''; - $ret = array(); - $found = false; - $ret['results']['count'] = 0; - - if ( strpos($key, ":") > 0 ) - { - $countryid = substr($key, 0, strpos($key, ":") ); - $key = substr($key, strpos($key, ":") + 1); - } else - $countryid = false; - - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) LIKE '".$key."' GROUP BY `CountryID` ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - if($country = $GLOBALS['APIDB']->fetchArray($result)) { - $table = $country['Table']; - } - } - if (!isset($table) && !empty($countryid) && $countryid != false) - { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE `CountryID` = '".$countryid."' GROUP BY `CountryID` ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - if($country = $GLOBALS['APIDB']->fetchArray($result)) { - $table = $country['Table']; - } - } - } - - if (empty($countryid) && $countryid == false && $found==false) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` GROUP BY `CountryID` ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - while(($cntry = $GLOBALS['APIDB']->fetchArray($result)) && $found == false) { - $sql = "SELECT *, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, concat(`RegionName`, ', ', '".$cntry['Country']."') as `Address` FROM `" . $cntry['Table'] . "` WHERE md5(concat(`CountryID`, `CordID`)) LIKE '" . $key . "' ORDER BY RAND() LIMIT 1"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $place = $GLOBALS['APIDB']->fetchArray($resultb); - $table = $cntry['Table']; - $found = true; - if (!isset($country)) - $country = $cntry; - } - $sql = "SELECT count(*) as records FROM `" . $GLOBALS['APIDB']->prefix($table) . "`"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $records = $GLOBALS['APIDB']->fetchArray($resultb); - $country['records'] = $records['records']; - } else - $country['records'] = 0 ; - if ($format!='xml') - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - else - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - if (strpos($place['RegionName'], ',')) { - $parts = explode(',',$place['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $place['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($place['RegionName'])); - if ($format!='xml') - $ret['results']['places'][$table][$place['key']] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - else - $ret['results']['places'][$table][$key] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - $ret['results']['nearby'] = array(); - $ret['results']['type'] = 'place'; - $ret['results']['count'] = 1; - $ret['results']['nearby'] = 0; - $ret['longitude'] = $place['Longitude_Float']; - $ret['latitude'] = $place['Latitude_Float']; - $ret['address'] = $places['Address']; - } - } - } elseif ($found==false && !empty($countryid)) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE `CountryID` = '$countryid' ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - while(($cntry = $GLOBALS['APIDB']->fetchArray($result)) && $found == false) { - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $cntry['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, concat(`RegionName`, ', ', '".$cntry['Country']."') as `Address` FROM `" . $cntry['Table'] . "` WHERE md5(concat(`CountryID`, `CordID`)) LIKE '" . $key . "' ORDER BY RAND() LIMIT 1"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $place = $GLOBALS['APIDB']->fetchArray($resultb); - $table = $cntry['Table']; - $found=true; - if (!isset($country)) - $country = $cntry; - } - $sql = "SELECT count(*) as records FROM `" . $GLOBALS['APIDB']->prefix($table) . "`"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $records = $GLOBALS['APIDB']->fetchArray($resultb); - $country['records'] = $records['records']; - } else - $country['records'] = 0 ; - if ($format!='xml') - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - else - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - if (strpos($place['RegionName'], ',')) { - $parts = explode(',',$place['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $place['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($place['RegionName'])); - if ($format!='xml') - $ret['results']['places'][$table][$place['key']] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - else - $ret['results']['places'][$table][$key] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - $ret['results']['nearby'] = array(); - $ret['results']['type'] = 'place'; - $ret['results']['count'] = 1; - $ret['results']['nearby'] = 0; - $ret['longitude'] = $place['Longitude_Float']; - $ret['latitude'] = $place['Latitude_Float']; - $ret['address'] = $places['Address']; - } - } - } - - if (empty($countryid) && $countryid == false && $found==false) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` GROUP BY `CountryID` ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - while(($cntry = $GLOBALS['APIDB']->fetchArray($result)) && $found == false) { - $sql = "SELECT *, concat(`CountryID`, ':', md5(concat('".$cntry['Table']."_venues', `VenueID`, `CordID`, `CountryID`))) as `key` FROM `" . $cntry['Table'] . "_venues` WHERE md5(concat('".$cntry['Table']."_venues',`VenueID`,`CordID`,`CountryID`)) LIKE '" . $key . "' ORDER BY RAND() LIMIT 1"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $venue = $GLOBALS['APIDB']->fetchArray($resultb); - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $cntry['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, concat(`RegionName`, ', ', '".$cntry['Country']."') as `Address` FROM `" . $cntry['Table'] . "` WHERE `CordID` = '" . $venue['CordID']. "'"; - if ($resultc = $GLOBALS['APIDB']->queryF($sql)) - $place = $GLOBALS['APIDB']->fetchArray($resultc); - $table = $ctry['Table']; - $found = true; - if (!isset($country)) - $country = $cntry; - $sql = "SELECT count(*) as records FROM `" . $GLOBALS['APIDB']->prefix($table) . "`"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $records = $GLOBALS['APIDB']->fetchArray($resultb); - $country['records'] = $records['records']; - } else - $country['records'] = 0 ; - if ($format!='xml') - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - else - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - if (strpos($place['RegionName'], ',')) { - $parts = explode(',',$place['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $place['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($place['RegionName'])); - if ($format!='xml') - $ret['results']['places'][$table][$place['key']] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - else - $ret['results']['places'][$table][$key] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - $ret['results']['nearby'] = array(); - $ret['results']['type'] = 'place'; - $ret['results']['count'] = 1; - $ret['results']['nearby'] = 0; - $ret['longitude'] = $venue['Longitude']; - $ret['latitude'] = $venue['Latitude']; - $ret['address'] = $venue['Vicinity']; - } - } - } - } elseif ($found==false && !empty($countryid)) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE `CountryID` = '$countryid' ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - while(($cntry = $GLOBALS['APIDB']->fetchArray($result)) && $found == false) { - $sql = "SELECT *, concat(`CountryID`, ':', md5(concat('".$cntry['Table']."_venues', `VenueID`, `CordID`, `CountryID`))) as `key` FROM `" . $cntry['Table'] . "_venues` WHERE md5(concat('".$cntry['Table']."_venues',`VenueID`,`CordID`,`CountryID`)) LIKE '" . $key . "' ORDER BY RAND() LIMIT 1"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $venue = $GLOBALS['APIDB']->fetchArray($resultb); - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $cntry['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, concat(`RegionName`, ', ', '".$cntry['Country']."') as `Address` FROM `" . $cntry['Table'] . "` WHERE `CordID` = '" . $venue['CordID']. "'"; - if ($resultc = $GLOBALS['APIDB']->queryF($sql)) - $place = $GLOBALS['APIDB']->fetchArray($resultc); - $table = $cntry['Table']; - $found=true; - if (!isset($country)) - $country = $cntry; - $sql = "SELECT count(*) as records FROM `" . $GLOBALS['APIDB']->prefix($table) . "`"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $records = $GLOBALS['APIDB']->fetchArray($resultb); - $country['records'] = $records['records']; - } else - $country['records'] = 0 ; - if ($format!='xml') - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - else - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - if (strpos($place['RegionName'], ',')) { - $parts = explode(',',$place['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $place['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($place['RegionName'])); - if ($format!='xml') - $ret['results']['places'][$table][$place['key']] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - else - $ret['results']['places'][$table][$key] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - $ret['results']['nearby'] = array(); - $ret['results']['type'] = 'place'; - $ret['results']['count'] = 1; - $ret['results']['nearby'] = 0; - $ret['longitude'] = $venue['Longitude']; - $ret['latitude'] = $venue['Latitude']; - $ret['address'] = $venue['Vicinity']; - } - } - } - } - - if (empty($countryid) && $countryid == false && $found==false) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` GROUP BY `CountryID` ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - while(($cntry = $GLOBALS['APIDB']->fetchArray($result)) && $found == false) { - $sql = "SELECT *, concat(`CountryID`, ':', md5(concat('".$cntry['Table']."_address', `AddressID`, `CordID`, `CountryID`))) as `key` FROM `" . $cntry['Table'] . "_venues` WHERE md5(concat('".$cntry['Table']."_address',`AddressID`,`CordID`,`CountryID`)) LIKE '" . $key . "' ORDER BY RAND() LIMIT 1"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $address = $GLOBALS['APIDB']->fetchArray($resultb); - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $cntry['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, concat(`RegionName`, ', ', '".$cntry['Country']."') as `Address` FROM `" . $cntry['Table'] . "` WHERE `CordID` = '" . $address['CordID']. "'"; - if ($resultc = $GLOBALS['APIDB']->queryF($sql)) - $place = $GLOBALS['APIDB']->fetchArray($resultc); - $table = $cntry['Table']; - $found = true; - if (!isset($country)) - $country = $cntry; - $sql = "SELECT count(*) as records FROM `" . $GLOBALS['APIDB']->prefix($table) . "`"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $records = $GLOBALS['APIDB']->fetchArray($resultb); - $country['records'] = $records['records']; - } else - $country['records'] = 0 ; - if ($format!='xml') - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - else - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - if (strpos($place['RegionName'], ',')) { - $parts = explode(',',$place['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $place['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($place['RegionName'])); - if ($format!='xml') - $ret['results']['places'][$table][$place['key']] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - else - $ret['results']['places'][$table][$key] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - $ret['results']['nearby'] = array(); - $ret['results']['type'] = 'place'; - $ret['results']['count'] = 1; - $ret['results']['nearby'] = 0; - $ret['longitude'] = $address['Longitude']; - $ret['latitude'] = $address['Latitude']; - $ret['address'] = $address['Formatted']; - } - } - } - } elseif ($found==false && !empty($countryid)) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE `CountryID` = '$countryid' ORDER BY RAND() "; - if ($result = $GLOBALS['APIDB']->queryF($sql)) { - while(($cntry = $GLOBALS['APIDB']->fetchArray($result)) && $found == false) { - $sql = "SELECT *, concat(`CountryID`, ':', md5(concat('".$cntry['Table']."_address', `AddressID`, `CordID`, `CountryID`))) as `key` FROM `" . $cntry['Table'] . "_venues` WHERE md5(concat('".$cntry['Table']."_address',`AddressID`,`CordID`,`CountryID`)) LIKE '" . $key . "' ORDER BY RAND() LIMIT 1"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $address = $GLOBALS['APIDB']->fetchArray($resultb); - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $country['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, concat(`RegionName`, ', ', '".$country['Country']."') as `Address` FROM `" . $cntry['Table'] . "` WHERE `CordID` = '" . $address['CordID']. "'"; - if ($resultc = $GLOBALS['APIDB']->queryF($sql)) - $place = $GLOBALS['APIDB']->fetchArray($resultc); - $table = $cntry['Table']; - $found=true; - if (!isset($country)) - $country = $cntry; - $sql = "SELECT count(*) as records FROM `" . $GLOBALS['APIDB']->prefix($table) . "`"; - if ($resultb = $GLOBALS['APIDB']->queryF($sql)) { - $records = $GLOBALS['APIDB']->fetchArray($resultb); - $country['records'] = $records['records']; - } else - $country['records'] = 0 ; - if ($format!='xml') - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - else - $ret['results']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - if (strpos($place['RegionName'], ',')) { - $parts = explode(',',$place['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $place['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($place['RegionName'])); - if ($format!='xml') - $ret['results']['places'][$table][$place['key']] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - else - $ret['results']['places'][$table][$key] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - $ret['results']['nearby'] = array(); - $ret['results']['type'] = 'place'; - $ret['results']['count'] = 1; - $ret['results']['nearby'] = 0; - $ret['longitude'] = $address['Longitude']; - $ret['latitude'] = $address['Latitude']; - $ret['address'] = $address['Formatted']; - } - } - } - } - - if ($radius <= 0 || $radius == API_RADIUS_DEFAULT) - return $ret; - - if ($found == true && $radius > 0) { - if (isset($ret['results']['places'])) - $places = $ret['results']['places']; - elseif (isset($ret['results']['place'])) - $places = $ret['results']['place']; - foreach($places as $table => $values) { - foreach($values as $key => $place) { - $sql = "SELECT *, md5(concat(`CountryID`, `Country`, max(`CountryID`) - `CountryID` + 1)) as `key` FROM `" . $GLOBALS['APIDB']->prefix('countries') . "` WHERE `Table` LIKE '$table' GROUP BY `CountryID` ORDER BY RAND() "; - $result = $GLOBALS['APIDB']->queryF($sql); - while($country = $GLOBALS['APIDB']->fetchArray($result)) { - $sql = "SELECT *, concat(`RegionName`, ', ', '" . $country['Country'] . "') as `Address`, concat(`CountryID`, ':', md5(concat(`CountryID`, `CordID`))) as `key`, 3956 * 2 * ASIN(SQRT(POWER(SIN((" . abs($place['Latitude_Float']) . " - abs(`Latitude_Float`)) * pi() / 180 / 2), 2) + COS(" . abs($place['Latitude_Float']) . " * pi() / 180 ) * COS(abs(`Latitude_Float`) * pi() / 180) * POWER(SIN((" . $place['Longitude_Float'] . " - `Longitude_Float`) * pi() / 180 / 2), 2) )) as `Distance`, concat(`RegionName`, ', ', '".$country['Country']."') as `Address` FROM `" . $GLOBALS['APIDB']->prefix($table) . "` HAVING `Distance` <= ".$radius." ORDER BY `Distance`"; - $resultb = $GLOBALS['APIDB']->queryF($sql); - while ($place = $GLOBALS['APIDB']->fetchArray($resultb)) { - if ($format!='xml') - $ret['results']['nearby']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - else - $ret['results']['nearby']['countries'][$table] = strippedArray($country, explode('|',API_COUNTRY_FIELDS)); - if (strpos($place['RegionName'], ',')) { - $parts = explode(',',$place['RegionName']); - array_reverse($parts); - foreach($parts as $key => $value) - $parts[$key] = trim($value); - $place['RegionName'] = implode(' ', $parts); - } - $key = str_replace(array(" ", "'", "-", "_", "\"", "`" , ",", "(", ")"), "", strtolower($place['RegionName'])); - if ($format!='xml') - $ret['results']['nearby']['places'][$table][$place['key']] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - else - $ret['results']['nearby']['places'][$table][$key] = strippedArray($place, explode('|',API_PLACES_FIELDS)); - $ret['results']['nearby']++; - } - } - } - } - if ($ret['results']['nearby']>0) - $ret['results']['type'] = 'keyed'; - } - return $ret; - } -} - -if (!function_exists("getAddressGeoMapping")) -{ - /** - * gets Geo Longitude + Latitude for an known address - * - * @param string $address - * @return number[]|unknown[]|mixed[] - */ - function getAddressGeoMapping($address = '') - { - $geo = json_decode(getURIData('https://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($address).'&sensor=false'), true); - $latitude = $longitude = 0.0001; - if ($geo['status'] == 'OK') { - $address = array(); - foreach($geo['results'][0]['address_components'] as $values) - { - if (in_array('administrative_area_level_1', $values['types']) && in_array('political', $values['types'])) - $address['State'] = $values['long_name']; - elseif (in_array('administrative_area_level_2', $values['types']) && in_array('political', $values['types'])) - $address['Council'] = $values['short_name']; - elseif (in_array('postal_code', $values['types'])) - $address['Postcode'] = $values['long_name']; - elseif (in_array('subpremise', $values['types'])) - $address['Unit'] = $values['long_name']; - elseif (in_array('street_number', $values['types'])) - $address['Building'] = $values['long_name']; - elseif (in_array('route', $values['types'])) - $address['Street'] = $values['long_na... [truncated message content] |
From: <wis...@us...> - 2017-08-31 04:47:38
|
Revision: 13291 http://sourceforge.net/p/xoops/svn/13291 Author: wishcraft Date: 2017-08-31 04:47:34 +0000 (Thu, 31 Aug 2017) Log Message: ----------- :: Completing Statistian System of Images for releases.xoops.org! Modified Paths: -------------- XoopsModules/images/trunk/modules/images/class/fields.php XoopsModules/images/trunk/modules/images/class/images.php XoopsModules/images/trunk/modules/images/include/functions.php XoopsModules/images/trunk/modules/images/sql/mysql.sql XoopsModules/images/trunk/modules/images/xoops_version.php Added Paths: ----------- XoopsModules/images/trunk/modules/images/class/ascii/index.html XoopsModules/images/trunk/modules/images/class/ascii/php7.0/index.html XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/index.html XoopsModules/images/trunk/modules/images/class/index.html XoopsModules/images/trunk/modules/images/class/statistics.php XoopsModules/images/trunk/modules/images/class/xcp/index.html XoopsModules/images/trunk/modules/images/crons/index.html XoopsModules/images/trunk/modules/images/crons/stats-fields-ending-biweekly.php XoopsModules/images/trunk/modules/images/crons/stats-fields-ending-daily.php XoopsModules/images/trunk/modules/images/crons/stats-fields-ending-hourly.php XoopsModules/images/trunk/modules/images/crons/stats-fields-ending-monthly.php XoopsModules/images/trunk/modules/images/crons/stats-fields-ending-quarterly.php XoopsModules/images/trunk/modules/images/crons/stats-fields-ending-weekly.php XoopsModules/images/trunk/modules/images/crons/stats-fields-ending-yearly.php XoopsModules/images/trunk/modules/images/crons/stats-images-ending-biweekly.php XoopsModules/images/trunk/modules/images/crons/stats-images-ending-daily.php XoopsModules/images/trunk/modules/images/crons/stats-images-ending-hourly.php XoopsModules/images/trunk/modules/images/crons/stats-images-ending-monthly.php XoopsModules/images/trunk/modules/images/crons/stats-images-ending-quarterly.php XoopsModules/images/trunk/modules/images/crons/stats-images-ending-weekly.php XoopsModules/images/trunk/modules/images/crons/stats-images-ending-yearly.php XoopsModules/images/trunk/modules/images/images/blacklist/ XoopsModules/images/trunk/modules/images/images/blacklist/permanent-avatar.png XoopsModules/images/trunk/modules/images/images/blacklist/permanent-icons.png XoopsModules/images/trunk/modules/images/images/blacklist/permanent-logo.png XoopsModules/images/trunk/modules/images/images/blacklist/permanent-photo.png XoopsModules/images/trunk/modules/images/images/blacklist/temporary-avatar.png XoopsModules/images/trunk/modules/images/images/blacklist/temporary-icons.png XoopsModules/images/trunk/modules/images/images/blacklist/temporary-logo.png XoopsModules/images/trunk/modules/images/images/blacklist/temporary-photo.png XoopsModules/images/trunk/modules/images/images/index.html XoopsModules/images/trunk/modules/images/include/data/ XoopsModules/images/trunk/modules/images/include/data/timezones.diz XoopsModules/images/trunk/modules/images/include/enumerators/blacklisted__images.diz XoopsModules/images/trunk/modules/images/include/enumerators/day-name__statistics.diz XoopsModules/images/trunk/modules/images/include/enumerators/mode__statistics.diz XoopsModules/images/trunk/modules/images/include/enumerators/segment-hour__statistics.diz XoopsModules/images/trunk/modules/images/include/enumerators/segment-minute__statistics.diz XoopsModules/images/trunk/modules/images/include/enumerators/segment-month__statistics.diz XoopsModules/images/trunk/modules/images/include/enumerators/typal__statistics.diz XoopsModules/images/trunk/modules/images/include/enumerators/type__statistics.diz Added: XoopsModules/images/trunk/modules/images/class/ascii/index.html =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/index.html (rev 0) +++ XoopsModules/images/trunk/modules/images/class/ascii/index.html 2017-08-31 04:47:34 UTC (rev 13291) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/class/ascii/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/ascii/php7.0/index.html =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/php7.0/index.html (rev 0) +++ XoopsModules/images/trunk/modules/images/class/ascii/php7.0/index.html 2017-08-31 04:47:34 UTC (rev 13291) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/class/ascii/php7.0/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/index.html =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/index.html (rev 0) +++ XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/index.html 2017-08-31 04:47:34 UTC (rev 13291) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: XoopsModules/images/trunk/modules/images/class/fields.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/fields.php 2017-08-30 23:20:53 UTC (rev 13290) +++ XoopsModules/images/trunk/modules/images/class/fields.php 2017-08-31 04:47:34 UTC (rev 13291) @@ -42,10 +42,52 @@ $this->initVar("field", XOBJ_DTYPE_TXTBOX, null, false, 64); $this->initVar("typal", XOBJ_DTYPE_ENUM, 'unknown', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'typal')); $this->initVar("views", XOBJ_DTYPE_INT, null, false); - $this->initVar("viewed", XOBJ_DTYPE_INT, null, false); $this->initVar("images", XOBJ_DTYPE_INT, null, false); $this->initVar("errors", XOBJ_DTYPE_INT, null, false); $this->initVar("megabytes", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("images_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_hourly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("images_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_daily", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("images_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_weekly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("images_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_biweekly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("images_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_monthly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("images_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_quarterly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("images_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_yearly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("start_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("viewed", XOBJ_DTYPE_INT, null, false); $this->initVar("created", XOBJ_DTYPE_INT, null, false); $this->initVar("errored", XOBJ_DTYPE_INT, null, false); } @@ -79,6 +121,13 @@ /** + * Variables that comprise of statistic indicies + * + * @var array + */ + var $_statistian_fields = array('views','images','errors','megabytes'); + + /** * Constructor * * @param object $db reference to the {@link XoopsDatabase} object @@ -175,7 +224,7 @@ */ function addImages($field = '', $typal = '', $number = 1) { - $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `images` = `images` + '$number' WHERE `field` = '" . $field . "' AND `typal` = '" . $typal . "'"; + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `images` = `images` + '$number', `images_hourly` = `images_hourly` + '$number', `images_daily` = `images_daily` + '$number', `images_weekly` = `images_weekly` + '$number', `images_biweekly` = `images_biweekly` + '$number', `images_monthly` = `images_monthly` + '$number', `images_quarterly` = `images_quarterly` + '$number', `images_yearly` = `images_yearly` + '$number' WHERE `field` = '" . $field . "' AND `typal` = '" . $typal . "'"; @$GLOBALS['xoopsDB']->queryF($sql); } @@ -189,7 +238,7 @@ */ function addErrors($field = '', $typal = '', $number = 1) { - $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `errors` = `errors` + '$number', `errored` = UNIX_TIMESTAMP() WHERE `field` = '" . $field . "' AND `typal` = '" . $typal . "'"; + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `errors` = `errors` + '$number', `errors_hourly` = `errors_hourly` + '$number', `errors_daily` = `errors_daily` + '$number', `errors_weekly` = `errors_weekly` + '$number', `errors_biweekly` = `errors_biweekly` + '$number', `errors_monthly` = `errors_monthly` + '$number', `errors_quarterly` = `errors_quarterly` + '$number', `errors_yearly` = `errors_yearly` + '$number', `errored` = UNIX_TIMESTAMP() WHERE `field` = '" . $field . "' AND `typal` = '" . $typal . "'"; @$GLOBALS['xoopsDB']->queryF($sql); } } Modified: XoopsModules/images/trunk/modules/images/class/images.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/images.php 2017-08-30 23:20:53 UTC (rev 13290) +++ XoopsModules/images/trunk/modules/images/class/images.php 2017-08-31 04:47:34 UTC (rev 13291) @@ -41,28 +41,72 @@ */ function __construct($id = null) { - $this->initVar("id", XOBJ_DTYPE_INT, null, false); - $this->initVar("uid", XOBJ_DTYPE_INT, null, false); - $this->initVar("hash", XOBJ_DTYPE_TXTBOX, null, false, 16); - $this->initVar("field", XOBJ_DTYPE_TXTBOX, null, false, 64); - $this->initVar("type", XOBJ_DTYPE_ENUM, 'unknown', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'type')); - $this->initVar("storage", XOBJ_DTYPE_ENUM, 'files', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'storage')); - $this->initVar("md5", XOBJ_DTYPE_TXTBOX, null, false, 32); - $this->initVar("url", XOBJ_DTYPE_TXTBOX, null, false, 255); - $this->initVar("width", XOBJ_DTYPE_INT, null, false); - $this->initVar("height", XOBJ_DTYPE_INT, null, false); - $this->initVar("bytes", XOBJ_DTYPE_INT, null, false); - $this->initVar("views", XOBJ_DTYPE_INT, null, false); - $this->initVar("viewed", XOBJ_DTYPE_INT, null, false); - $this->initVar("updates", XOBJ_DTYPE_INT, null, false); - $this->initVar("errors", XOBJ_DTYPE_INT, null, false); - $this->initVar("megabytes", XOBJ_DTYPE_FLOAT, null, false); - $this->initVar("updated", XOBJ_DTYPE_INT, null, false); - $this->initVar("created", XOBJ_DTYPE_INT, null, false); - $this->initVar("checked", XOBJ_DTYPE_INT, null, false); - $this->initVar("errored", XOBJ_DTYPE_INT, null, false); - $this->initVar("emailed", XOBJ_DTYPE_INT, null, false); - $this->initVar("data", XOBJ_DTYPE_OTHER, null, false); + $this->initVar("id", XOBJ_DTYPE_INT, null, false); + $this->initVar("fieldid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("hash", XOBJ_DTYPE_TXTBOX, null, false, 16); + $this->initVar("field", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("type", XOBJ_DTYPE_ENUM, 'unknown', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'type')); + $this->initVar("storage", XOBJ_DTYPE_ENUM, 'files', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'storage')); + $this->initVar("blacklisted", XOBJ_DTYPE_ENUM, 'none', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'storage')); + $this->initVar("md5", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("url", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("width", XOBJ_DTYPE_INT, null, false); + $this->initVar("height", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes", XOBJ_DTYPE_INT, null, false); + $this->initVar("views", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_hourly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_daily", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_weekly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_biweekly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_monthly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_quarterly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("views_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes_yearly", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("start_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_hourly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_daily", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_weekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_biweekly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_monthly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_quarterly", XOBJ_DTYPE_INT, null, false); + $this->initVar("start_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("ended_yearly", XOBJ_DTYPE_INT, null, false); + $this->initVar("viewed", XOBJ_DTYPE_INT, null, false); + $this->initVar("updated", XOBJ_DTYPE_INT, null, false); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("checked", XOBJ_DTYPE_INT, null, false); + $this->initVar("errored", XOBJ_DTYPE_INT, null, false); + $this->initVar("emailed", XOBJ_DTYPE_INT, null, false); + $this->initVar("data", XOBJ_DTYPE_OTHER, null, false); } /** @@ -123,6 +167,20 @@ } /** + * Checks for ending of a statistic time cursor + * + * @param unknown $case + */ + public function isStatistianEnding($case = '') + { + if (in_array($case, imagesEnumeratorValues('statistics.php', 'mode'))) + { + return (self::getVar("ended_$case") < time()); + } + return false; + } + + /** * Adds View(s) count to object * * @param number $number @@ -130,9 +188,9 @@ */ public function addViews($number = 1) { - $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_images") . "` SET `views` = `views` + $number, `viewed` = UNIX_TIMESTAMP() WHERE `id` = " . self::getVar('id'); + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_images") . "` SET `views` = `views` + $number, `views_hourly` = `views_hourly` + $number, `views_daily` = `views_daily` + $number, `views_weekly` = `views_weekly` + $number, `views_biweekly` = `views_biweekly` + $number, `views_monthly` = `views_monthly` + $number, `views_quarterly` = `views_quarterly` + $number, `views_yearly` = `views_yearly` + $number, `viewed` = UNIX_TIMESTAMP() WHERE `id` = " . self::getVar('id'); @$GLOBALS['xoopsDB']->queryF($sql); - $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `views` = `views` + $number, `viewed` = UNIX_TIMESTAMP() WHERE `field` = '" . self::getVar('field') . "'"; + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `views` = `views` + $number, `views_hourly` = `views_hourly` + $number, `views_daily` = `views_daily` + $number, `views_weekly` = `views_weekly` + $number, `views_biweekly` = `views_biweekly` + $number, `views_monthly` = `views_monthly` + $number, `views_quarterly` = `views_quarterly` + $number, `views_yearly` = `views_yearly` + $number, `viewed` = UNIX_TIMESTAMP() WHERE `field` = '" . self::getVar('field') . "'"; @$GLOBALS['xoopsDB']->queryF($sql); } @@ -146,9 +204,9 @@ public function addMegabytes($bytes = 0) { $megabytes = $bytes / 1024 / 1024; - $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_images") . "` SET `megabytes` = `megabytes` + '$megabytes', `updated` = UNIX_TIMESTAMP() WHERE `id` = " . self::getVar('id'); + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_images") . "` SET `megabytes` = `megabytes` + '$megabytes', `megabytes_hourly` = `megabytes_hourly` + '$megabytes', `megabytes_daily` = `megabytes_daily` + '$megabytes', `megabytes_weekly` = `megabytes_weekly` + '$megabytes', `megabytes_biweekly` = `megabytes_biweekly` + '$megabytes', `megabytes_monthly` = `megabytes_monthly` + '$megabytes', `megabytes_quarterly` = `megabytes_quarterly` + '$megabytes', `megabytes_yearly` = `megabytes_yearly` + '$megabytes', `updated` = UNIX_TIMESTAMP() WHERE `id` = " . self::getVar('id'); @$GLOBALS['xoopsDB']->queryF($sql); - $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `megabytes` = `megabytes` + '$megabytes' WHERE `field` = '" . self::getVar('field') . "'"; + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `megabytes` = `megabytes` + '$megabytes', `megabytes_hourly` = `megabytes_hourly` + '$megabytes', `megabytes_daily` = `megabytes_daily` + '$megabytes', `megabytes_weekly` = `megabytes_weekly` + '$megabytes', `megabytes_biweekly` = `megabytes_biweekly` + '$megabytes', `megabytes_monthly` = `megabytes_monthly` + '$megabytes', `megabytes_quarterly` = `megabytes_quarterly` + '$megabytes', `megabytes_yearly` = `megabytes_yearly` + '$megabytes' WHERE `field` = '" . self::getVar('field') . "'"; @$GLOBALS['xoopsDB']->queryF($sql); } @@ -686,6 +744,12 @@ class ImagesImagesHandler extends ImagesXoopsPersistableObjectHandler { + /** + * Variables that comprise of statistic indicies + * + * @var array + */ + var $_statistian_fields = array('views','updates','errors','megabytes'); /** * Constructor @@ -715,9 +779,10 @@ $field = $fieldsHandler->create(); $field->setVar('field', $object->getVar('field')); $field->setVar('typal', $object->getFieldTypal()); + $field->setVars(imagesStatisticalTiming(array())); if (!$field = $fieldsHandler->get($fieldsHandler->insert($field, true))) return false; - + $object->setVar('fieldid', $field->getVar('id')); if ($object->getVar('uid')==0 && is_object($GLOBALS['xoopsUser'])) $object->setVar('uid', $GLOBALS['xoopsUser']->getVar('uid')); $object->setVar('created', time()); @@ -729,6 +794,7 @@ $crc = new xcp($data = $field->getVar('hash').$object->getVar('uid').$imagesConfigList['format'].microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); $object->setVar('hash', $crc->crc); } + $object->setVars(imagesStatisticalTiming(array())); $criteria = new CriteriaCompo(new Criteria('uid', $object->getVar('uid'))); $criteria->add(new Criteria('field', $object->getVar('field'))); if (!in_array($object->getVar('field'), $imagesConfigList['ascii_fields'])) @@ -748,7 +814,6 @@ } return $id; } else { - if (in_array($object->getVar('field'), $imagesConfigList['ascii_fields'])) { $crc = new xcp($data = $object->getVar('uid').'ascii'.microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); Added: XoopsModules/images/trunk/modules/images/class/index.html =================================================================== --- XoopsModules/images/trunk/modules/images/class/index.html (rev 0) +++ XoopsModules/images/trunk/modules/images/class/index.html 2017-08-31 04:47:34 UTC (rev 13291) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/class/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/statistics.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/statistics.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/statistics.php 2017-08-31 04:47:34 UTC (rev 13291) @@ -0,0 +1,603 @@ +<?php +/** + * Legal Consent is a module for obtain legal guardianship Images + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://fonts2web.org.uk + * @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) + * @author Simon Roberts (wishcraft) <wis...@us...> + * @subpackage Images + * @description Legal Consent is a module for obtain legal guardianship Images + * @version 1.0.1 + * @link http://internetfounder.wordpress.com + */ + +if (!defined('_MD_CONSENT_MODULE_DIRNAME')) { + return false; +} + +//* +require_once (__DIR__ . DIRECTORY_SEPARATOR . 'objects.php'); + +/** + * Database Table for Statistics in Legal Consent Module + * + * For Table:- + * <code> + * CREATE TABLE `images_statistics` ( + `id` mediumint(32) NOT NULL AUTO_INCREMENT, + `mode` enum('hourly','daily','weekly','biweekly','monthly','quarterly','yearly') NOT NULL DEFAULT '', + `typal` enum('icons','logo','photo','avatar') NOT NULL DEFAULT '', + `type` enum('fields','images') NOT NULL DEFAULT '', + `typeid` mediumint(15) NOT NULL DEFAULT '0', + `hash` varchar(18) NOT NULL DEFAULT '', + `key` varchar(64) NOT NULL DEFAULT '', + `timezone` varchar(128) NOT NULL DEFAULT '', + `commence` int(13) NOT NULL DEFAULT '0', + `finished` int(13) NOT NULL DEFAULT '0', + `year` int(4) NOT NULL DEFAULT '0', + `month` int(2) NOT NULL DEFAULT '0', + `day` int(2) NOT NULL DEFAULT '0', + `week` int(2) NOT NULL DEFAULT '0', + `hour` int(2) NOT NULL DEFAULT '0', + `minute` int(2) NOT NULL DEFAULT '0', + `seconds` int(2) NOT NULL DEFAULT '0', + `segment-month` enum('0-3','3-6','6-9','9-12') NOT NULL DEFAULT '0-3', + `segment-hour` enum('0-3','3-6','6-9','9-12','12-15','15-18','18-21','21-24') NOT NULL DEFAULT '0-3', + `segment-minute` enum('0-15','15-30','30-45','45-60') NOT NULL DEFAULT '0-15', + `day-name` enum('Sun','Sat','Mon','Tue','Wed','Thu','Fri') NOT NULL DEFAULT 'Sun', + `stat` float(22,9) NOT NULL DEFAULT '0.000000000', + `sum_item_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_item_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_item_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_item_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_item_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_item_hourly` int(13) NOT NULL DEFAULT '0', + `sum_item_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_item_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_item_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_item_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_item_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_item_daily` int(13) NOT NULL DEFAULT '0', + `sum_item_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_item_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_item_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_item_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_item_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_item_weekly` int(13) NOT NULL DEFAULT '0', + `sum_item_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_item_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_item_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_item_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_item_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_item_biweekly` int(13) NOT NULL DEFAULT '0', + `sum_item_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_item_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_item_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_item_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_item_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_item_monthly` int(13) NOT NULL DEFAULT '0', + `sum_item_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_item_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_item_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_item_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_item_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_item_quarterly` int(13) NOT NULL DEFAULT '0', + `sum_item_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_item_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_item_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_item_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_item_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_item_yearly` int(13) NOT NULL DEFAULT '0', + `sum_key_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_key_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_key_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_key_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_key_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_key_hourly` int(13) NOT NULL DEFAULT '0', + `sum_key_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_key_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_key_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_key_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_key_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_key_daily` int(13) NOT NULL DEFAULT '0', + `sum_key_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_key_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_key_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_key_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_key_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_key_weekly` int(13) NOT NULL DEFAULT '0', + `sum_key_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_key_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_key_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_key_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_key_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_key_biweekly` int(13) NOT NULL DEFAULT '0', + `sum_key_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_key_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_key_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_key_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_key_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_key_monthly` int(13) NOT NULL DEFAULT '0', + `sum_key_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_key_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_key_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_key_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_key_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_key_quarterly` int(13) NOT NULL DEFAULT '0', + `sum_key_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_key_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_key_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_key_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_key_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_key_yearly` int(13) NOT NULL DEFAULT '0', + `sum_typal_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_typal_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_typal_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_typal_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_typal_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_typal_hourly` int(13) NOT NULL DEFAULT '0', + `sum_typal_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_typal_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_typal_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_typal_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_typal_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_typal_daily` int(13) NOT NULL DEFAULT '0', + `sum_typal_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_typal_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_typal_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_typal_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_typal_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_typal_weekly` int(13) NOT NULL DEFAULT '0', + `sum_typal_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_typal_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_typal_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_typal_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_typal_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_typal_biweekly` int(13) NOT NULL DEFAULT '0', + `sum_typal_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_typal_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_typal_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_typal_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_typal_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_typal_monthly` int(13) NOT NULL DEFAULT '0', + `sum_typal_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_typal_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_typal_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_typal_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_typal_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_typal_quarterly` int(13) NOT NULL DEFAULT '0', + `sum_typal_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_typal_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_typal_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_typal_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_typal_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_typal_yearly` int(13) NOT NULL DEFAULT '0', + `sum_type_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_type_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_type_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_type_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_type_hourly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_type_hourly` int(13) NOT NULL DEFAULT '0', + `sum_type_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_type_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_type_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_type_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_type_daily` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_type_daily` int(13) NOT NULL DEFAULT '0', + `sum_type_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_type_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_type_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_type_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_type_weekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_type_weekly` int(13) NOT NULL DEFAULT '0', + `sum_type_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_type_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_type_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_type_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_type_biweekly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_type_biweekly` int(13) NOT NULL DEFAULT '0', + `sum_type_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_type_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_type_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_type_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_type_monthly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_type_monthly` int(13) NOT NULL DEFAULT '0', + `sum_type_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_type_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_type_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_type_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_type_quarterly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_type_quarterly` int(13) NOT NULL DEFAULT '0', + `sum_type_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `max_type_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `min_type_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `adv_type_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `std_type_yearly` float(22,9) NOT NULL DEFAULT '0.000000000', + `end_type_yearly` int(13) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `SEARCH` (`key`,`year`,`month`,`day`,`week`,`hour`,`minute`,`segment-month`,`segment-hour`,`segment-minute`,`day-name`) USING BTREE KEY_BLOCK_SIZE=32, + KEY `PERIODICS` (`commence`,`finished`,`mode`,`typal`,`type`,`typeid`), + KEY `INDICATING` (`mode`,`typal`,`type`,`typeid`,`hash`(11),`key`(16)), +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + * </code> + * @author Simon Roberts (wis...@us...) + * @copyright copyright (c) 2015 labs.coop + */ +class ImagesStatistics extends ImagesXoopsObject +{ + + var $handler = 'ImagesStatisticsHandler'; + + function __construct($id = null) + { + + self::initVar('id', XOBJ_DTYPE_INT, null, false); + self::initVar("mode", XOBJ_DTYPE_ENUM, '', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'mode')); + self::initVar("typal", XOBJ_DTYPE_ENUM, '', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'typal')); + self::initVar("type", XOBJ_DTYPE_ENUM, '', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'type')); + self::initVar('typeid', XOBJ_DTYPE_INT, null, false); + self::initVar('hash', XOBJ_DTYPE_TXTBOX, null, false, 18); + self::initVar('key', XOBJ_DTYPE_TXTBOX, null, false, 64); + self::initVar('timezone', XOBJ_DTYPE_TXTBOX, null, false, 128); + self::initVar('commence', XOBJ_DTYPE_INT, null, false); + self::initVar('finished', XOBJ_DTYPE_INT, null, false); + self::initVar('year', XOBJ_DTYPE_INT, null, false); + self::initVar('month', XOBJ_DTYPE_INT, null, false); + self::initVar('day', XOBJ_DTYPE_INT, null, false); + self::initVar('week', XOBJ_DTYPE_INT, null, false); + self::initVar('hour', XOBJ_DTYPE_INT, null, false); + self::initVar('minute', XOBJ_DTYPE_INT, null, false); + self::initVar('seconds', XOBJ_DTYPE_INT, null, false); + self::initVar('segment-month', XOBJ_DTYPE_ENUM, 'Both', false, false, false, ImagesEnumeratorValues(basename(__FILE__), 'segment-month')); + self::initVar('segment-hour', XOBJ_DTYPE_ENUM, 'Both', false, false, false, ImagesEnumeratorValues(basename(__FILE__), 'segment-hour')); + self::initVar('segment-minute', XOBJ_DTYPE_ENUM, 'Both', false, false, false, ImagesEnumeratorValues(basename(__FILE__), 'segment-minute')); + self::initVar('day-name', XOBJ_DTYPE_ENUM, 'Both', false, false, false, ImagesEnumeratorValues(basename(__FILE__), 'day-name')); + self::initVar('stat', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('sum_item_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_item_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_item_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_item_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_item_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_item_hourly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_item_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_item_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_item_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_item_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_item_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_item_daily', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_item_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_item_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_item_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_item_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_item_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_item_weekly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_item_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_item_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_item_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_item_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_item_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_item_biweekly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_item_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_item_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_item_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_item_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_item_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_item_monthly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_item_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_item_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_item_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_item_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_item_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_item_quarterly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_item_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_item_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_item_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_item_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_item_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_item_yearly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_key_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_key_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_key_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_key_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_key_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_key_hourly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_key_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_key_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_key_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_key_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_key_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_key_daily', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_key_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_key_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_key_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_key_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_key_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_key_weekly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_key_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_key_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_key_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_key_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_key_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_key_biweekly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_key_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_key_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_key_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_key_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_key_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_key_quarterly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_key_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_key_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_key_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_key_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_key_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_key_quarterly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_key_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_key_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_key_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_key_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_key_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_key_yearly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_typal_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_typal_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_typal_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_typal_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_typal_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_typal_hourly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_typal_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_typal_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_typal_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_typal_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_typal_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_typal_daily', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_typal_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_typal_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_typal_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_typal_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_typal_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_typal_weekly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_typal_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_typal_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_typal_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_typal_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_typal_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_typal_biweekly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_typal_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_typal_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_typal_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_typal_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_typal_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_typal_monthly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_typal_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_typal_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_typal_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_typal_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_typal_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_typal_quarterly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_typal_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_typal_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_typal_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_typal_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_typal_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_typal_yearly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_type_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_type_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_type_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_type_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_type_hourly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_type_hourly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_type_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_type_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_type_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_type_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_type_daily', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_type_daily', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_type_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_type_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_type_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_type_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_type_weekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_type_weekly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_type_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_type_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_type_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_type_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_type_biweekly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_type_biweekly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_type_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_type_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_type_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_type_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_type_monthly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_type_monthly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_type_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_type_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_type_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_type_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_type_quarterly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_type_quarterly', XOBJ_DTYPE_INT, null, false); + self::initVar('sum_type_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('max_type_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('min_type_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('adv_type_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('std_type_yearly', XOBJ_DTYPE_FLOAT, null, false); + self::initVar('end_type_yearly', XOBJ_DTYPE_INT, null, false); + + if (!empty($id) && !is_null($id)) + { + $handler = new $this->handler; + self::assignVars($handler->get($id)->getValues(array_keys($this->vars))); + } + + } + +} + + +/** + * Handler Class for Statistics + * @author Simon Roberts (wis...@us...) + * @copyright copyright (c) 2015 labs.coop + */ +class ImagesStatisticsHandler extends ImagesXoopsPersistableObjectHandler +{ + + /** + * + * @var array + */ + var $_periodics = array(); + + /** + * Table Name without prefix used + * + * @var string + */ + var $tbl = 'images_statistics'; + + /** + * Child Object Handling Class + * + * @var string + */ + var $child = 'ImagesStatistics'; + + /** + * Child Object Identity Key + * + * @var string + */ + var $identity = 'id'; + + /** + * Child Object Default Envaluing Costs + * + * @var string + */ + var $envalued = 'value'; + + function __construct(&$db) + { + self::$_periodics = array( 'hourly' => 3600, 'daily' => 3600 * 24, 'weekly' => 3600 * 24 * 7, 'biweekly' => 3600 * 24 * 7 * 2, + 'monthly' => 3600 * 24 * 7 * 4, 'quarterly' => 3600 * 24 * 7 * 4 * 4, 'yearly' => 3600 * 24 * 7 * 4 * 12 ); + if (!is_object($db)) + $db = $GLOBAL["xoopsDB"]; + parent::__construct($db, $this->tbl, $this->child, $this->identity, $this->envalued); + } + + /** + * Creates a ImagesStatistic Object for new + * + * {@inheritDoc} + * @see XoopsPersistableObjectHandler::create() + */ + function create($commence = 0) + { + if ($commence == 0) + $commence = time(); + $object = parent::create(true); + $object->setVar('timezone', date_default_timezone_get()); + $object->setVar('commence', $commence); + $object->setVar('year', date('Y', $object->getVar('commence'))); + $object->setVar('month', date('m', $object->getVar('commence'))); + $object->setVar('day', date('d', $object->getVar('commence'))); + $object->setVar('week', date('W', $object->getVar('commence'))); + $object->setVar('hour', date('H', $object->getVar('commence'))); + $object->setVar('minute', date('i', $object->getVar('commence'))); + $object->setVar('seconds', date('s', $object->getVar('commence'))); + $segments = ImagesEnumeratorValues(basename(__FILE__), 'segment-month'); + $object->setVar('segment-month', $segments[floor((date('m', $object->getVar('commence'))-1) / count($segments))]); + $segments = ImagesEnumeratorValues(basename(__FILE__), 'segment-hour'); + $object->setVar('segment-hour', $segments[floor((date('H', $object->getVar('commence'))-1) / count($segments))]); + $segments = ImagesEnumeratorValues(basename(__FILE__), 'segment-minute'); + $object->setVar('segment-minute', $segments[floor((date('i', $object->getVar('commence'))-1) / count($segments))]); + $object->setVar('day-name', date('D', $object->getVar('commence'))); + return $object; + } + + /** + * inserts a new record into the database + * + * {@inheritDoc} + * @see XoopsPersistableObjectHandler::insert() + */ + function insert(ImagesStatistics $object, $force = true) + { + if ($object->isNew()) + { + foreach(imagesEnumeratorValues(basename(__FILE__), 'mode') as $mode) + { + foreach(array('item','key','typal','type') as $state) + { + switch ($state) + { + case 'item': + $criteria = new CriteriaCompo(new Criteria('typal', $object->getVar('typal'))); + $criteria->add(new Criteria('mode', $object->getVar('mode'))); + $criteria->add(new Criteria('type', $object->getVar('type'))); + $criteria->add(new Criteria('commence', time() - self::$_periodics[$mode], "<=")); + $criteria->add(new Criteria('finished', time(), ">=")); + foreach(self::getStatisticArray($criteria) as $key => $value) + $object->setVar("$key_$state_$mode", $value); + break; + case 'key': + $criteria = new CriteriaCompo(new Criteria('key', $object->getVar('key'))); + $criteria->add(new Criteria('mode', $object->getVar('mode'))); + $criteria->add(new Criteria('type', $object->getVar('type'))); + $criteria->add(new Criteria('commence', time() - self::$_periodics[$mode], "<=")); + $criteria->add(new Criteria('finished', time(), ">=")); + foreach(self::getStatisticArray($criteria) as $key => $value) + $object->setVar("$key_$state_$mode", $value); + break; + case 'typal': + $criteria = new CriteriaCompo(new Criteria('typal', $object->getVar('typal'))); + $criteria->add(new Criteria('commence', time() - self::$_periodics[$mode], "<=")); + $criteria->add(new Criteria('finished', time(), ">=")); + foreach(self::getStatisticArray($criteria) as $key => $value) + $object->setVar("$key_$state_$mode", $value); + break; + case 'type': + $criteria = new CriteriaCompo(new Criteria('key', $object->getVar('key'))); + $criteria->add(new Criteria('commence', time() - self::$_periodics[$mode], "<=")); + $criteria->add(new Criteria('finished', t... [truncated message content] |
From: <wis...@us...> - 2017-08-30 23:20:56
|
Revision: 13290 http://sourceforge.net/p/xoops/svn/13290 Author: wishcraft Date: 2017-08-30 23:20:53 +0000 (Wed, 30 Aug 2017) Log Message: ----------- Images module for releases.xoops.org -- still alpha1! Modified Paths: -------------- XoopsModules/images/trunk/modules/images/class/fields.php XoopsModules/images/trunk/modules/images/class/images.php XoopsModules/images/trunk/modules/images/image.php Added Paths: ----------- XoopsModules/images/trunk/modules/images/crons/refresh-images.php XoopsModules/images/trunk/modules/images/crons/refresh-users-avatar.php XoopsModules/images/trunk/modules/images/crons/refresh-users-icons.php XoopsModules/images/trunk/modules/images/crons/refresh-users-logo.php XoopsModules/images/trunk/modules/images/crons/refresh-users-photo.php Modified: XoopsModules/images/trunk/modules/images/class/fields.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/fields.php 2017-08-30 22:08:50 UTC (rev 13289) +++ XoopsModules/images/trunk/modules/images/class/fields.php 2017-08-30 23:20:53 UTC (rev 13290) @@ -135,5 +135,62 @@ return false; } + /** + * get an Array of a field + * + * @param string $field + * @param string $return + * @return string[] + */ + function getFieldArray($field = '', $return = 'url') + { + $result = array(''); + $sql = "SELECT DISTINCT `$return` FROM `" . $GLOBALS['xoopsDB']->prefix('images_images') . "` WHERE `field` = '$field'"; + if ($query = $GLOBALS['xoopsDB']->queryF($sql)) + { + $value = 'https://'; + while(count($result)<$GLOBALS['xoopsDB']->getRowsNum($query)) + { + list($value) = $GLOBALS['xoopsDB']->fetchRow($query); + $result[] = $value; + } + if ($return == 'url') + { + $result[] = 'http://'; + $result[] = 'https://'; + $result[] = ''; + } + array_unique($result); + sort($result, SORT_ASC); + } + return $result; + } + + /** + * adds to the images count + * + * @param string $field + * @param string $typal + * @param number $number + */ + function addImages($field = '', $typal = '', $number = 1) + { + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `images` = `images` + '$number' WHERE `field` = '" . $field . "' AND `typal` = '" . $typal . "'"; + @$GLOBALS['xoopsDB']->queryF($sql); + } + + + /** + * adds to the error count + * + * @param string $field + * @param string $typal + * @param number $number + */ + function addErrors($field = '', $typal = '', $number = 1) + { + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `errors` = `errors` + '$number', `errored` = UNIX_TIMESTAMP() WHERE `field` = '" . $field . "' AND `typal` = '" . $typal . "'"; + @$GLOBALS['xoopsDB']->queryF($sql); + } } ?> \ No newline at end of file Modified: XoopsModules/images/trunk/modules/images/class/images.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/images.php 2017-08-30 22:08:50 UTC (rev 13289) +++ XoopsModules/images/trunk/modules/images/class/images.php 2017-08-30 23:20:53 UTC (rev 13290) @@ -710,13 +710,25 @@ { if (strlen($object->getVar('field'))==0 || strlen($object->getVar('url'))== 0) return false; + + $fieldsHandler = xoops_getModuleHandler('fields', basename(__DIR__)); + $field = $fieldsHandler->create(); + $field->setVar('field', $object->getVar('field')); + $field->setVar('typal', $object->getFieldTypal()); + if (!$field = $fieldsHandler->get($fieldsHandler->insert($field, true))) + return false; + if ($object->getVar('uid')==0 && is_object($GLOBALS['xoopsUser'])) $object->setVar('uid', $GLOBALS['xoopsUser']->getVar('uid')); $object->setVar('created', time()); - $object->setVar('type', $imagesConfigList['format']); + if (strlen($object->getVar('type')) == 0 || $object->getVar('type') == 'unknown') + $object->setVar('type', $imagesConfigList['format']); $object->setVar('storage', $imagesConfigList['storage']); - $crc = new xcp($data = $object->getVar('uid').$imagesConfigList['format'].microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); - $object->setVar('hash', $crc->crc); + if (strlen($object->getVar('hash')) == 0) + { + $crc = new xcp($data = $field->getVar('hash').$object->getVar('uid').$imagesConfigList['format'].microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); + $object->setVar('hash', $crc->crc); + } $criteria = new CriteriaCompo(new Criteria('uid', $object->getVar('uid'))); $criteria->add(new Criteria('field', $object->getVar('field'))); if (!in_array($object->getVar('field'), $imagesConfigList['ascii_fields'])) @@ -756,6 +768,7 @@ unset($asciiobjs); } } + $fieldsHandler->addImages($object->getVar('field'), $object->getFieldTypal()); } $object->setVar('updated', time()); return parent::insert($object, true); Added: XoopsModules/images/trunk/modules/images/crons/refresh-images.php =================================================================== --- XoopsModules/images/trunk/modules/images/crons/refresh-images.php (rev 0) +++ XoopsModules/images/trunk/modules/images/crons/refresh-images.php 2017-08-30 23:20:53 UTC (rev 13290) @@ -0,0 +1,33 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + +global $imagesConfigList; + +include_once dirname(__DIR__) . "/header.php"; + +$imagesHandler = xoops_getModuleHandler('images', basename(dirname(__DIR__))); +$criteria = new Criteria('checked', time(), "<="); +foreach($imagesHandler->getObjects($criteria) as $image) + $image->check(); + +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/crons/refresh-images.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/crons/refresh-users-avatar.php =================================================================== --- XoopsModules/images/trunk/modules/images/crons/refresh-users-avatar.php (rev 0) +++ XoopsModules/images/trunk/modules/images/crons/refresh-users-avatar.php 2017-08-30 23:20:53 UTC (rev 13290) @@ -0,0 +1,57 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + +global $imagesConfigList; + +include_once dirname(__DIR__) . "/header.php"; + +$userHandler = xoops_getHandler('users'); +$imagesHandler = xoops_getModuleHandler('images', basename(dirname(__DIR__))); +$profileHandler = xoops_getModuleHandler('profile', 'profile'); + +foreach($imageConfigList['avatar_fields'] as $field) +{ + $criteria = new CriteriaCompo(new Criteria($field, "('" . implode("', '", $imagesHandler->getFieldArray($field, 'url')) . "')", "NOT IN")); + foreach($profileHandler->getObjects($criteria) as $profile) + { + $populate = false; + if ($user = $userHandler->get($profile->getVar('profile_id'))) + { + foreach($user->getGroups() as $groupid) + if (in_array($groupid, $imageConfigList['populate_groups'])) + { + $populate = true; + continue; + } + } + if ($populate == true) + { + $image = $imagesHandler->create(); + $image->setVar('uid', $profile->getVar('profile_id')); + $image->setVar('field', $field); + $image->setVar('url', $profile->getVar($field)); + $imagesHandler->insert($image, true); + } + } +} +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/crons/refresh-users-avatar.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/crons/refresh-users-icons.php =================================================================== --- XoopsModules/images/trunk/modules/images/crons/refresh-users-icons.php (rev 0) +++ XoopsModules/images/trunk/modules/images/crons/refresh-users-icons.php 2017-08-30 23:20:53 UTC (rev 13290) @@ -0,0 +1,58 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + +global $imagesConfigList; + +include_once dirname(__DIR__) . "/header.php"; + +$userHandler = xoops_getHandler('users'); +$imagesHandler = xoops_getModuleHandler('images', basename(dirname(__DIR__))); +$profileHandler = xoops_getModuleHandler('profile', 'profile'); + +foreach($imageConfigList['icons_fields'] as $field) +{ + $criteria = new CriteriaCompo(new Criteria($field, "('" . implode("', '", $imagesHandler->getFieldArray($field, 'url')) . "')", "NOT IN")); + foreach($profileHandler->getObjects($criteria) as $profile) + { + $populate = false; + if ($user = $userHandler->get($profile->getVar('profile_id'))) + { + foreach($user->getGroups() as $groupid) + if (in_array($groupid, $imageConfigList['populate_groups'])) + { + $populate = true; + continue; + } + } + if ($populate == true) + { + $image = $imagesHandler->create(); + $image->setVar('uid', $profile->getVar('profile_id')); + $image->setVar('field', $field); + $image->setVar('url', $profile->getVar($field)); + $imagesHandler->insert($image, true); + } + } + +} +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/crons/refresh-users-icons.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/crons/refresh-users-logo.php =================================================================== --- XoopsModules/images/trunk/modules/images/crons/refresh-users-logo.php (rev 0) +++ XoopsModules/images/trunk/modules/images/crons/refresh-users-logo.php 2017-08-30 23:20:53 UTC (rev 13290) @@ -0,0 +1,58 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + +global $imagesConfigList; + +include_once dirname(__DIR__) . "/header.php"; + +$userHandler = xoops_getHandler('users'); +$imagesHandler = xoops_getModuleHandler('images', basename(dirname(__DIR__))); +$profileHandler = xoops_getModuleHandler('profile', 'profile'); + +foreach($imageConfigList['logo_fields'] as $field) +{ + $criteria = new CriteriaCompo(new Criteria($field, "('" . implode("', '", $imagesHandler->getFieldArray($field, 'url')) . "')", "NOT IN")); + foreach($profileHandler->getObjects($criteria) as $profile) + { + $populate = false; + if ($user = $userHandler->get($profile->getVar('profile_id'))) + { + foreach($user->getGroups() as $groupid) + if (in_array($groupid, $imageConfigList['populate_groups'])) + { + $populate = true; + continue; + } + } + if ($populate == true) + { + $image = $imagesHandler->create(); + $image->setVar('uid', $profile->getVar('profile_id')); + $image->setVar('field', $field); + $image->setVar('url', $profile->getVar($field)); + $imagesHandler->insert($image, true); + } + } + +} +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/crons/refresh-users-logo.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/crons/refresh-users-photo.php =================================================================== --- XoopsModules/images/trunk/modules/images/crons/refresh-users-photo.php (rev 0) +++ XoopsModules/images/trunk/modules/images/crons/refresh-users-photo.php 2017-08-30 23:20:53 UTC (rev 13290) @@ -0,0 +1,58 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + +global $imagesConfigList; + +include_once dirname(__DIR__) . "/header.php"; + +$userHandler = xoops_getHandler('users'); +$imagesHandler = xoops_getModuleHandler('images', basename(dirname(__DIR__))); +$profileHandler = xoops_getModuleHandler('profile', 'profile'); + +foreach($imageConfigList['photo_fields'] as $field) +{ + $criteria = new CriteriaCompo(new Criteria($field, "('" . implode("', '", $imagesHandler->getFieldArray($field, 'url')) . "')", "NOT IN")); + foreach($profileHandler->getObjects($criteria) as $profile) + { + $populate = false; + if ($user = $userHandler->get($profile->getVar('profile_id'))) + { + foreach($user->getGroups() as $groupid) + if (in_array($groupid, $imageConfigList['populate_groups'])) + { + $populate = true; + continue; + } + } + if ($populate == true) + { + $image = $imagesHandler->create(); + $image->setVar('uid', $profile->getVar('profile_id')); + $image->setVar('field', $field); + $image->setVar('url', $profile->getVar($field)); + $imagesHandler->insert($image, true); + } + } + +} +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/crons/refresh-users-photo.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: XoopsModules/images/trunk/modules/images/image.php =================================================================== --- XoopsModules/images/trunk/modules/images/image.php 2017-08-30 22:08:50 UTC (rev 13289) +++ XoopsModules/images/trunk/modules/images/image.php 2017-08-30 23:20:53 UTC (rev 13290) @@ -21,6 +21,7 @@ * @link http://internetfounder.wordpress.com */ +global $imagesConfigList; include_once __DIR__ . "/header.php"; @@ -36,14 +37,16 @@ { if ($image = $imagesHandler->getByHash($_REQUEST['hash'], $field->getVar('field'))) { - if (isset($_REQUEST['width']) && !empty($_REQUEST['width'])) - $width = $_REQUEST['width']; - if (isset($_REQUEST['height']) && !empty($_REQUEST['height'])) - $height = $_REQUEST['height']; + if (isset($_REQUEST['width']) && !empty($_REQUEST['width']) && ((integer)$_REQUEST['width'] > $image->getMinimumWidth() && (integer)$_REQUEST['width'] < $image->getMaximumWidth())) + $width = (integer)$_REQUEST['width']; else - $height = $width; + $width = $image->getWidth(); + if (isset($_REQUEST['height']) && !empty($_REQUEST['height']) && ((integer)$_REQUEST['height'] > $image->getMinimumHeight() && (integer)$_REQUEST['height'] < $image->getMaximumHeight())) + $height = (integer)$_REQUEST['height']; + else + $height = $image->getHeight(); - switch((isset($_REQUEST['format']) && !empty($_REQUEST['format'])?$_REQUEST['format']:'default')) + switch((isset($_REQUEST['format']) && !empty($_REQUEST['format'])?$_REQUEST['format']:$imagesConfigList['png'])) { default: case $imagesConfigList['png']: |
From: <wis...@us...> - 2017-08-30 22:08:53
|
Revision: 13289 http://sourceforge.net/p/xoops/svn/13289 Author: wishcraft Date: 2017-08-30 22:08:50 +0000 (Wed, 30 Aug 2017) Log Message: ----------- Images module for releases.xoops.org -- still alpha1! Modified Paths: -------------- XoopsModules/images/trunk/modules/images/class/ascii/engine.php XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ascii_engine.php XoopsModules/images/trunk/modules/images/class/ascii/php7.0/php7.0.php XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ascii_engine.php XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/text-image.com.php XoopsModules/images/trunk/modules/images/class/images.php XoopsModules/images/trunk/modules/images/class/objects.php XoopsModules/images/trunk/modules/images/footer.php XoopsModules/images/trunk/modules/images/header.php XoopsModules/images/trunk/modules/images/include/functions.php XoopsModules/images/trunk/modules/images/language/english/admin.php XoopsModules/images/trunk/modules/images/language/english/forms.php XoopsModules/images/trunk/modules/images/language/english/main.php XoopsModules/images/trunk/modules/images/language/english/modinfo.php XoopsModules/images/trunk/modules/images/sql/mysql.sql XoopsModules/images/trunk/modules/images/xoops_version.php Added Paths: ----------- XoopsModules/images/trunk/modules/images/.htaccess XoopsModules/images/trunk/modules/images/class/errors.php XoopsModules/images/trunk/modules/images/class/fields.php XoopsModules/images/trunk/modules/images/image.php XoopsModules/images/trunk/modules/images/include/enumerators/typal__fields.diz XoopsModules/images/trunk/modules/images/include/enumerators/type__errors.diz XoopsModules/images/trunk/modules/images/include/htaccess.txt XoopsModules/images/trunk/modules/images/language/english/errors.php Added: XoopsModules/images/trunk/modules/images/.htaccess =================================================================== --- XoopsModules/images/trunk/modules/images/.htaccess (rev 0) +++ XoopsModules/images/trunk/modules/images/.htaccess 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,6 @@ +RewriteEngine On +RewriteRule ^([0-9a-zA-Z\-]{4-18})/(icons|logo|photo|avatar)/([0-9a-zA-Z\-]{4-18})(.png|.jpg|.gif|.txt)$ ./image.php?field=$1&type=$2&hash=$3&format=$4 [L,NC,QSA] +RewriteRule ^([0-9a-zA-Z\-]{4-18})/(icons|logo|photo|avatar)/([0-9]+)/([0-9a-zA-Z\-]{4-18})(.png|.jpg|.gif|.txt)$ ./image.php?field=$1&type=$2&width=$3&hash=$4&format=$5 [L,NC,QSA] +RewriteRule ^([0-9a-zA-Z\-]{4-18})/(icons|logo|photo|avatar)/([0-9]+)x([0-9]+)/([0-9a-zA-Z\-]{4-18})(.png|.jpg|.gif)$ ./image.php?field=$1&type=$2&width=$3&height=$4&hash=$5&format=$6 [L,NC,QSA] +RewriteRule ^([0-9a-zA-Z\-]{4-18})/(icons|logo|photo|avatar)/(small|medium|large)/([0-9a-zA-Z\-]{4-18})(.txt)$ ./image.php?field=$1&type=$2&scale=$3&hash=$4&format=$5 [L,NC,QSA] +RewriteRule ^(index|icons|logo|photo|avatar)(.html)$ ./index.php?typal=$1 [L,NC,QSA] \ No newline at end of file Modified: XoopsModules/images/trunk/modules/images/class/ascii/engine.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/engine.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/engine.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,5 +1,27 @@ <?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + class AsciiEngine { Modified: XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ascii_engine.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ascii_engine.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ascii_engine.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,26 @@ <?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ - $ascengine = array(); $ascengine['class']['file'] = basename(__DIR__).'.php'; $ascengine['class']['name'] = str_replace(" ", "", ucwords(str_replace(array('-','_','.', ' ', basename(__DIR__))))) . 'AsciiArtEngine'; Modified: XoopsModules/images/trunk/modules/images/class/ascii/php7.0/php7.0.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/php7.0/php7.0.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/php7.0/php7.0.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,4 +1,25 @@ -<?php +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'engine.php'; require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'WideImage' . DIRECTORY_SEPARATOR . 'WideImage.php'; Modified: XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ascii_engine.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ascii_engine.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ascii_engine.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,28 @@ <?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + $ascengine = array(); $ascengine['class']['file'] = basename(__DIR__).'.php'; $ascengine['class']['name'] = str_replace(" ", "", ucwords(str_replace(array('-','_','.', ' ', basename(__DIR__))))) . 'AsciiArtEngine'; Modified: XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/text-image.com.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/text-image.com.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/text-image.com.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,5 +1,27 @@ -<?php +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'engine.php'; class TextImageComAsciiArtEngine extends AsciiEngine Added: XoopsModules/images/trunk/modules/images/class/errors.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/errors.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/errors.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,87 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +require_once __DIR__ . DIRECTORY_SEPARATOR . 'objects.php'; + +class ImagesErrors extends ImagesXoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("id", XOBJ_DTYPE_INT, null, false); + $this->initVar("type", XOBJ_DTYPE_ENUM, 'unknown', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'type')); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("imageid", XOBJ_DTYPE_INT, null, false); + $this->initVar("fieldid", XOBJ_DTYPE_INT, null, false); + $this->initVar("code", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("when", XOBJ_DTYPE_INT, null, false); + $this->initVar("message", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("emailed", XOBJ_DTYPE_INT, null, false); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("deleted", XOBJ_DTYPE_INT, null, false); + } + +} + + +class ImagesErrorsHandler extends ImagesXoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "images_errors", "ImagesErrors", "id", "hash"); + } + + /** + * Inserts a ImagesErrors Object into the database + * + * {@inheritDoc} + * @see XoopsPersistableObjectHandler::insert() + */ + function insert(ImagesErrors $object, $force = true) + { + global $imagesConfigList; + if ($object->isNew()) + { + $object->getVar('created', time()); + } + return parent::insert($object, true); + } + +} +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/class/errors.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/fields.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/fields.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/fields.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,139 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +require_once __DIR__ . DIRECTORY_SEPARATOR . 'objects.php'; + +class ImagesFields extends ImagesXoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("id", XOBJ_DTYPE_INT, null, false); + $this->initVar("hash", XOBJ_DTYPE_TXTBOX, null, false, 16); + $this->initVar("field", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("typal", XOBJ_DTYPE_ENUM, 'unknown', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'typal')); + $this->initVar("views", XOBJ_DTYPE_INT, null, false); + $this->initVar("viewed", XOBJ_DTYPE_INT, null, false); + $this->initVar("images", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("errored", XOBJ_DTYPE_INT, null, false); + } + + + /** + * gets Field Typal + * @return string|boolean + */ + public function getFieldTypal($options = NULL) + { + global $imagesConfigList; + if (is_null($options) || empty($options)) + { + $options = array('icons', 'logo', 'photo', 'avatar'); + shuffle($options); + shuffle($options); + shuffle($options); + shuffle($options); + } + foreach($options as $option) + if (in_array(self::getVar('field'), $imagesConfigList["$option_fields"])) + return $option; + return 'unknown'; + } +} + + +class ImagesFieldsHandler extends ImagesXoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "images_fields", "ImagesFields", "id", "hash"); + } + + /** + * Inserts a ImagesFields Object into the database + * + * {@inheritDoc} + * @see XoopsPersistableObjectHandler::insert() + */ + function insert(ImagesFields $object, $force = true) + { + global $imagesConfigList; + if ($object->isNew()) + { + $object->getVar('created', time()); + $object->getVar('typal', $object->getFieldTypal()); + $criteria = new CriteriaCompo(new Criteria('field', $object->getVar('field'))); + $criteria->add(new Criteria('typal', $object->getVar('typal'))); + if (self::getCount($criteria) > 0) + { + $objs = self::getObjects($criteria); + if (isset($objs[0]) && !empty($objs[0])) + return $objs[0]->getVar('id'); + } + $crc = new xcp($data = $object->getVar('field').$object->getVar('created').microtime().$object->getVar('typal'), mt_rand(0,255), mt_rand(5,14)); + $object->setVar('hash', $crc->crc); + } + return parent::insert($object, true); + } + + /** + * gets ImagesFields object from hash info + * + * @param string $hash + * @param string $typal + * @return mixed|boolean + */ + function getByHash($hash = '', $typal = '') + { + $criteria = new CriteriaCompo(new Criteria('hash', $hash)); + $criteria->add(new Criteria('typal', $typal)); + if (self::getCount($criteria) > 0) + { + $objs = self::getObjects($criteria); + if (isset($objs[0]) && !empty($objs[0])) + return $objs[0]; + } + return false; + } + +} +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/class/fields.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: XoopsModules/images/trunk/modules/images/class/images.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/images.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/images.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -12,15 +12,16 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage webdav - * @description Module for controlling and propogating webdav resources for XOOPS Users + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + if (!defined("XOOPS_ROOT_PATH")) { exit(); @@ -53,6 +54,9 @@ $this->initVar("bytes", XOBJ_DTYPE_INT, null, false); $this->initVar("views", XOBJ_DTYPE_INT, null, false); $this->initVar("viewed", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes", XOBJ_DTYPE_FLOAT, null, false); $this->initVar("updated", XOBJ_DTYPE_INT, null, false); $this->initVar("created", XOBJ_DTYPE_INT, null, false); $this->initVar("checked", XOBJ_DTYPE_INT, null, false); @@ -92,6 +96,10 @@ */ public function getTmpFileSource() { + static $tmp = ''; + if (!empty($tmp) && file_exists($tmp) && filesize($tmp) > 0) + return $tmp; + global $imagesConfigList; if (self::getVar('storage') == 'database') { @@ -123,14 +131,33 @@ public function addViews($number = 1) { $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_images") . "` SET `views` = `views` + $number, `viewed` = UNIX_TIMESTAMP() WHERE `id` = " . self::getVar('id'); - return $GLOBALS['xoopsDB']->queryF($sql); + @$GLOBALS['xoopsDB']->queryF($sql); + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `views` = `views` + $number, `viewed` = UNIX_TIMESTAMP() WHERE `field` = '" . self::getVar('field') . "'"; + @$GLOBALS['xoopsDB']->queryF($sql); } + /** + * Adds megabyte count to object + * + * @param number $bytes + * @return unknown + */ + public function addMegabytes($bytes = 0) + { + $megabytes = $bytes / 1024 / 1024; + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_images") . "` SET `megabytes` = `megabytes` + '$megabytes', `updated` = UNIX_TIMESTAMP() WHERE `id` = " . self::getVar('id'); + @$GLOBALS['xoopsDB']->queryF($sql); + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `megabytes` = `megabytes` + '$megabytes' WHERE `field` = '" . self::getVar('field') . "'"; + @$GLOBALS['xoopsDB']->queryF($sql); + } + + /** * checks the URL for a new MD5 and updates it if it exists */ public function check() { + global $imagesConfigList; if (self::getVar('checked') > time()) return false; $data = self::getURLData(self::getVar('url')); @@ -370,9 +397,7 @@ $data = file($source); self::setVar('width', strlen($data[0]) - 1); self::setVar('height', count($data)); - } - break; case "database": @@ -382,7 +407,6 @@ $data = file($source); self::setVar('width', strlen($data[0]) - 1); self::setVar('height', count($data)); - break; } @@ -398,6 +422,222 @@ self::setVar('checked', time() + $imagesConfigsList['checking']); } + /** + * gets Field Typal + * @return string|boolean + */ + public function getFieldTypal($options = NULL) + { + global $imagesConfigList; + if (is_null($options) || empty($options)) + { + $options = array('icons', 'logo', 'photo', 'avatar'); + shuffle($options); + shuffle($options); + shuffle($options); + shuffle($options); + } + foreach($options as $option) + if (in_array(self::getVar('field'), $imagesConfigList["$option_fields"])) + return $option; + return false; + } + + /** + * get Default Width + * + * @return unknown|boolean + */ + function getWidth() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["$typal_width"]; + return false; + } + + /** + * gets maximum width + * + * @return unknown|boolean + */ + function getMaximumWidth() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["maximum_$typal_width"]; + return false; + } + + /* + * gets minimal width + */ + function getMinumumWidth() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["minimum_$typal_width"]; + return false; + } + + + /* + * gets original master minimal width + */ + function getOriginalWidth() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["original_$typal_width"]; + return false; + } + /** + * gets default height + * + * @return unknown|boolean + */ + function getHeight() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["$typal_height"]; + return false; + } + + /** + * gets maximum height + * + * @return unknown|boolean + */ + function getMaximumHeight() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["maximum_$typal_height"]; + return false; + } + + /** + * gets minimal height + * + * @return unknown|boolean + */ + function getMinumumHeight() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["minimum_$typal_height"]; + return false; + } + + + /** + * gets original master minimal height + * + * @return unknown|boolean + */ + function getOriginalHeight() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["original_$typal_height"]; + return false; + } + + /** + * gets the image data and mime type + * + * @param string $type + * @param number $width + */ + function getImageData($type = 'png', $width = 0, $height = 0) + { + global $imagesConfigList; + xoops_load("XoopsCache"); + if (!$result = XoopsCache::read($cachekey = basename(dirname(__DIR__)) . '-' . $type . '--' . $width . 'x' . $height . '--' . self::getVar('hash'))) + { + $result = array('mimetype' => "text/plane", 'data' => ''); + switch ($type) + { + case 'png': + if ($width <= 0 && $height <= 0) + { + $width = self::getWidth(); + $height = self::getHeight(); + } + if ($width > 0 && $height <= 0) + $height = self::getHeight(); + if ($width < self::getMinumumWidth()) + $width = self::getMinumumWidth(); + if ($width > self::getMaximumWidth()) + $width = self::getMaximumWidth(); + if ($height < self::getMinumumHeight()) + $height = self::getMinumumHeight(); + if ($height > self::getMaximumHeight()) + $height = self::getMaximumHeight(); + $img = WideImage::loadFromFile(self::getTmpFileSource()); + $result = array('mimetype' => 'image/png', 'data' => $img->resize($width, $height)->asString($type)); + break; + case 'jpg': + if ($width <= 0 && $height <= 0) + { + $width = self::getWidth(); + $height = self::getHeight(); + } + if ($width > 0 && $height <= 0) + $height = self::getHeight(); + if ($width < self::getMinumumWidth()) + $width = self::getMinumumWidth(); + if ($width > self::getMaximumWidth()) + $width = self::getMaximumWidth(); + if ($height < self::getMinumumHeight()) + $height = self::getMinumumHeight(); + if ($height > self::getMaximumHeight()) + $height = self::getMaximumHeight(); + $img = WideImage::loadFromFile(self::getTmpFileSource()); + $result = array('mimetype' => 'image/jpeg', 'data' => $img->resize($width, $height)->asString($type)); + break; + case 'gif': + if ($width <= 0 && $height <= 0) + { + $width = self::getWidth(); + $height = self::getHeight(); + } + if ($width > 0 && $height <= 0) + $height = self::getHeight(); + if ($width < self::getMinumumWidth()) + $width = self::getMinumumWidth(); + if ($width > self::getMaximumWidth()) + $width = self::getMaximumWidth(); + if ($height < self::getMinumumHeight()) + $height = self::getMinumumHeight(); + if ($height > self::getMaximumHeight()) + $height = self::getMaximumHeight(); + $img = WideImage::loadFromFile(self::getTmpFileSource()); + $result = array('mimetype' => 'image/gif', 'data' => $img->resize($width, $height)->asString($type)); + break; + case 'ascii': + $asciiHandler = new AsciiEngineHandler(); + if ($data = $asciiHandler->getAsciiArt(self::getTmpFileSource(), $width, $imagesConfigList['ascii_mode'], $imagesConfigList['ascii_engine'])) + { + $result = array('mimetype' => 'text/plane', 'data' => $data); + } + break; + } + } + XoopsCache::write($cachekey, $result, $wait = mt_rand($imagesConfigList['minimum_cache_wait'], $imagesConfigList['maximum_cache_wait'])); + if (!$caches = XoopsCache::read($sesskey = basename(dirname(__DIR__)) . '-sessions')) + { + $caches = array(); + $caches[$cachekey] = time() + $wait; + } else + $caches[$cachekey] = time() + $wait; + XoopsCache::write($sesskey, $caches, $imagesConfigList['maximum_cache_wait']); + self::addMegabytes(strlen($result['data'])); + return $result; + + } + /* function getURIData() * cURL Routine for passing $_POST Variable and retreiving URL * @@ -410,7 +650,7 @@ * * @return string */ - private function getURLData($uri = '', $timeout = 65, $connectout = 65, $posts = array()) + private function getURLData($uri = '', $timeout = 0, $connectout = 0, $posts = array()) { global $imagesModule, $imagesConfigsList, $imagesConfigs, $imagesConfigsOptions; @@ -426,8 +666,8 @@ curl_setopt($art, CURLOPT_POST, (count($posts)==0?false:true)); if (count($posts)!=0) curl_setopt($art, CURLOPT_POSTFIELDS, http_build_query($posts)); - curl_setopt($art, CURLOPT_CONNECTTIMEOUT, $connectout); - curl_setopt($art, CURLOPT_TIMEOUT, $timeout); + curl_setopt($art, CURLOPT_CONNECTTIMEOUT, ($connectout!=0?$connectout:$imagesConfigsList['curl_connections'])); + curl_setopt($art, CURLOPT_TIMEOUT, ($timeout!=0?$timeout:$imagesConfigsList['curl_timeout'])); curl_setopt($art, CURLOPT_RETURNTRANSFER, true); curl_setopt($art, CURLOPT_VERBOSE, false); curl_setopt($art, CURLOPT_SSL_VERIFYHOST, false); @@ -468,30 +708,82 @@ global $imagesConfigList; if ($object->isNew()) { - global $imagesConfigList; + if (strlen($object->getVar('field'))==0 || strlen($object->getVar('url'))== 0) + return false; if ($object->getVar('uid')==0 && is_object($GLOBALS['xoopsUser'])) $object->setVar('uid', $GLOBALS['xoopsUser']->getVar('uid')); $object->setVar('created', time()); $object->setVar('type', $imagesConfigList['format']); $object->setVar('storage', $imagesConfigList['storage']); - $crc = new xcp($data = $object->getVar('uid').$object->getVar('created').microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); + $crc = new xcp($data = $object->getVar('uid').$imagesConfigList['format'].microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); $object->setVar('hash', $crc->crc); - if (in_array($object->getVar('field'), $imagesConfigList['ascii_fields'])) + $criteria = new CriteriaCompo(new Criteria('uid', $object->getVar('uid'))); + $criteria->add(new Criteria('field', $object->getVar('field'))); + if (!in_array($object->getVar('field'), $imagesConfigList['ascii_fields'])) + $criteria->add(new Criteria('type', $object->getVar('type'))); + else + $criteria->add(new Criteria('type', "('" . $object->getVar('type') . "','ascii-small','ascii-medium','ascii-large')", "IN")); + if (self::getCount($criteria) > 0) { - $asciiobjs = array(); - $asciiobjs['small'] = $object; - $asciiobjs['small']->setVar('type', 'ascii-small'); - $asciiobjs['medium'] = $object; - $asciiobjs['medium']->setVar('type', 'ascii-medium'); - $asciiobjs['large'] = $object; - $asciiobjs['large']->setVar('type', 'ascii-large'); - @parent::insert($asciiobjs['small'], true); - @parent::insert($asciiobjs['medium'], true); - @parent::insert($asciiobjs['large'], true); - unset($asciiobjs); + foreach(self::getObjects($criteria) as $obj) + { + $obj->setVar('url', $object->getVar('url')); + $obj->setVar('checked', time() + mt_rand(320, 4800)); + if ($obj->getVar('type') == $object->getVar('type')) + $id = parent::insert($obj, true); + else + @parent::insert($obj, true); + } + return $id; + } else { + + if (in_array($object->getVar('field'), $imagesConfigList['ascii_fields'])) + { + $crc = new xcp($data = $object->getVar('uid').'ascii'.microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); + $asciiobjs = array(); + $asciiobjs['small'] = $object; + $asciiobjs['small']->setVar('type', 'ascii-small'); + $asciiobjs['small']->setVar('hash', $crc->crc); + $asciiobjs['medium'] = $object; + $asciiobjs['medium']->setVar('type', 'ascii-medium'); + $asciiobjs['medium']->setVar('hash', $crc->crc); + $asciiobjs['large'] = $object; + $asciiobjs['large']->setVar('type', 'ascii-large'); + $asciiobjs['large']->setVar('hash', $crc->crc); + @parent::insert($asciiobjs['small'], true); + @parent::insert($asciiobjs['medium'], true); + @parent::insert($asciiobjs['large'], true); + unset($asciiobjs); + } } } + $object->setVar('updated', time()); return parent::insert($object, true); } + + /** + * gets ImagesFields object from hash info + * + * @param string $hash + * @param string $field + * @param string $type + * @return mixed|boolean + */ + function getByHash($hash = '', $field = '', $type = '') + { + $criteria = new CriteriaCompo(new Criteria('hash', $hash)); + if (!empty($field)) + $criteria->add(new Criteria('field', $field)); + if (!empty($type)) + $criteria->add(new Criteria('type', $type)); + if (self::getCount($criteria) > 0) + { + $objs = self::getObjects($criteria); + if (isset($objs[0]) && !empty($objs[0])) + return $objs[0]; + } + return false; + } + } ?> \ No newline at end of file Modified: XoopsModules/images/trunk/modules/images/class/objects.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/objects.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/objects.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * Legal Images is a module for obtain legal guardianship Images + * XOOPS Remote Images URL Cache and Management in Profile Module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -9,15 +9,19 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * @copyright The XOOPS Project http://fonts2web.org.uk - * @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) - * @author Simon Roberts (wishcraft) <wis...@us...> - * @subpackage Images - * @description Legal Images is a module for obtain legal guardianship Images - * @version 1.0.1 + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + if (!defined('_MI_Images_MODULE_DIRNAME')) { return false; } Modified: XoopsModules/images/trunk/modules/images/footer.php =================================================================== --- XoopsModules/images/trunk/modules/images/footer.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/footer.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Languages management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -12,16 +12,15 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage languages - * @description Module for fitting languages on xoops + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ - include_once XOOPS_ROOT_PATH . "/footer.php"; ?> \ No newline at end of file Modified: XoopsModules/images/trunk/modules/images/header.php =================================================================== --- XoopsModules/images/trunk/modules/images/header.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/header.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Languages management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -12,12 +12,12 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage languages - * @description Module for fitting languages on xoops + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ Added: XoopsModules/images/trunk/modules/images/image.php =================================================================== --- XoopsModules/images/trunk/modules/images/image.php (rev 0) +++ XoopsModules/images/trunk/modules/images/image.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,91 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + + +include_once __DIR__ . "/header.php"; + +$GLOBALS['xoopsLogger']->activated = false; +if (function_exists('mb_http_output')) { + mb_http_output('pass'); +} + +$fieldsHandler = xoops_getModuleHandler('fields', basename(__DIR__)); +$imagesHandler = xoops_getModuleHandler('images', basename(__DIR__)); + +if ($field = $fieldsHandler->getByHash($_REQUEST['field'], $_REQUEST['typal'])) +{ + if ($image = $imagesHandler->getByHash($_REQUEST['hash'], $field->getVar('field'))) + { + if (isset($_REQUEST['width']) && !empty($_REQUEST['width'])) + $width = $_REQUEST['width']; + if (isset($_REQUEST['height']) && !empty($_REQUEST['height'])) + $height = $_REQUEST['height']; + else + $height = $width; + + switch((isset($_REQUEST['format']) && !empty($_REQUEST['format'])?$_REQUEST['format']:'default')) + { + default: + case $imagesConfigList['png']: + $result = $image->getImageData('png', $width, $height); + break; + case $imagesConfigList['jpg']: + $result = $image->getImageData('jpg', $width, $height); + break; + case $imagesConfigList['gif']: + $result = $image->getImageData('gif', $width, $height); + break; + case $imagesConfigList['txt']: + switch((isset($_REQUEST['scale']) && !empty($_REQUEST['scale'])?$_REQUEST['scale']:'default')) + { + default: + $result = $image->getImageData('ascii', ($width<=0?$imagesConfigList['ascii_medium_width']:$width)); + break; + case 'small': + $result = $image->getImageData('ascii', $imagesConfigList['ascii_small_width']); + break; + case 'medium': + $result = $image->getImageData('ascii', $imagesConfigList['ascii_medium_width']); + break; + case 'large': + $result = $image->getImageData('ascii', $imagesConfigList['ascii_large_width']); + break; + break; + } + } + if (!empty($result['data'])) + { + if(ini_get('zlib.output_compression')) { + ini_set('zlib.output_compression', 'Off'); + } + if (function_exists('http_response_code')) + http_response_code(201); + header('Content-Type: ' . $result['mimetype']); + die($result['data']); + } + } +} +if (function_exists('http_response_code')) + http_response_code(501); +die("No Resulting Images Found for Hash Keys!"); +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/image.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/include/enumerators/typal__fields.diz =================================================================== --- XoopsModules/images/trunk/modules/images/include/enumerators/typal__fields.diz (rev 0) +++ XoopsModules/images/trunk/modules/images/include/enumerators/typal__fields.diz 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,5 @@ +icons +logo +photo +avatar +unknown \ No newline at end of file Added: XoopsModules/images/trunk/modules/images/include/enumerators/type__errors.diz =================================================================== --- XoopsModules/images/trunk/modules/images/include/enumerators/type__errors.diz (rev 0) +++ XoopsModules/images/trunk/modules/images/include/enumerators/type__errors.diz 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,4 @@ +system +module +user +unknown \ No newline at end of file Modified: XoopsModules/images/trunk/modules/images/include/functions.php =================================================================== --- XoopsModules/images/trunk/modules/images/include/functions.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/include/functions.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Languages management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -13,15 +13,16 @@ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> * @subpackage images - * @description Module for cache url for images in profile and turning also into ASCII Art + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + function images_load_config() { global $xoopsModuleConfig; Added: XoopsModules/images/trunk/modules/images/include/htaccess.txt =================================================================== --- XoopsModules/images/trunk/modules/images/include/htaccess.txt (rev 0) +++ XoopsModules/images/trunk/modules/images/include/htaccess.txt 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,3 @@ +RewriteEngine On +RewriteRule ^%base%/([0-9]+)/([0-9]+)/index%html% ./modules/languages/index.php?start=$1&limit=$2 +RewriteRule ^%base%/requests%html% ./modules/languages/requests.php [L,NC,QSA] Modified: XoopsModules/images/trunk/modules/images/language/english/admin.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/admin.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/language/english/admin.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -12,12 +12,12 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage webdav - * @description Module for controlling and propogating webdav resources for XOOPS Users + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ Added: XoopsModules/images/trunk/modules/images/language/english/errors.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/errors.php (rev 0) +++ XoopsModules/images/trunk/modules/images/language/english/errors.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,32 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + + +if (!defined('XOOPS_ROOT_PATH')) { exit(); } + +define("IMAGES_ERRORS_ORIGINAL_WIDTH_CODE","100"); +define("IMAGES_ERRORS_ORIGINAL_WIDTH_MESSAGE","The original source URL minimal width has not been met it is %spx and a width of %spx is required!"); +define("IMAGES_ERRORS_ORIGINAL_HEIGHT_CODE","101"); +define("IMAGES_ERRORS_ORIGINAL_HEIGHT_MESSAGE","The original source URL minimal height has not been met it is %spx and a height of %spx is required!"); +define("IMAGES_ERRORS_EMAIL_NOT_SENDING_CODE","200"); +define("IMAGES_ERRORS_EMAIL_NOT_SENDING_MESSAGE","You need to check the setting for postfix and mailman, for some reason the mail isn't transmitting!"); \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/language/english/errors.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: XoopsModules/images/trunk/modules/images/language/english/forms.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/forms.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/language/english/forms.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -12,16 +12,17 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage webdav - * @description Module for controlling and propogating webdav resources for XOOPS Users + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + if (!defined('XOOPS_ROOT_PATH')) { exit(); } define("LANGS_FORMS_REQUESTS_TITLE", "Request new language to be added to supported types!"); Modified: XoopsModules/images/trunk/modules/images/language/english/main.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/main.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/language/english/main.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -12,17 +12,18 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage webdav - * @description Module for controlling and propogating webdav resources for XOOPS Users + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + if (!defined('XOOPS_ROOT_PATH')) { exit(); } define("LANGS_MN_INDEX_TITLE", "Supported Languages: %s of %s"); Modified: XoopsModules/images/trunk/modules/images/language/english/modinfo.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/modinfo.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/language/english/modinfo.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -12,17 +12,18 @@ * @copyright The XOOPS Proje... [truncated message content] |
From: <wis...@us...> - 2017-08-30 18:15:06
|
Revision: 13288 http://sourceforge.net/p/xoops/svn/13288 Author: wishcraft Date: 2017-08-30 18:15:02 +0000 (Wed, 30 Aug 2017) Log Message: ----------- Images module for releases.xoops.org -- still alpha1! Added Paths: ----------- XoopsModules/images/ XoopsModules/images/trunk/ XoopsModules/images/trunk/modules/ XoopsModules/images/trunk/modules/images/ XoopsModules/images/trunk/modules/images/admin/ XoopsModules/images/trunk/modules/images/class/ XoopsModules/images/trunk/modules/images/class/WideImage/ XoopsModules/images/trunk/modules/images/class/WideImage/Canvas.php XoopsModules/images/trunk/modules/images/class/WideImage/Coordinate.php XoopsModules/images/trunk/modules/images/class/WideImage/Exception.php XoopsModules/images/trunk/modules/images/class/WideImage/Font/ XoopsModules/images/trunk/modules/images/class/WideImage/Font/GDF.php XoopsModules/images/trunk/modules/images/class/WideImage/Font/PS.php XoopsModules/images/trunk/modules/images/class/WideImage/Font/TTF.php XoopsModules/images/trunk/modules/images/class/WideImage/Image.php XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/ XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/BMP.php XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/GD.php XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/GD2.php XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/GIF.php XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/JPEG.php XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/PNG.php XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/TGA.php XoopsModules/images/trunk/modules/images/class/WideImage/MapperFactory.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/ XoopsModules/images/trunk/modules/images/class/WideImage/Operation/AddNoise.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/ApplyConvolution.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/ApplyFilter.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/ApplyMask.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/AsGrayscale.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/AsNegative.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/AutoCrop.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/CopyChannelsPalette.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/CopyChannelsTrueColor.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/CorrectGamma.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/Crop.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/Flip.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/GetMask.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/Merge.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/Mirror.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/Resize.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/ResizeCanvas.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/Rotate.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/RoundCorners.php XoopsModules/images/trunk/modules/images/class/WideImage/Operation/Unsharp.php XoopsModules/images/trunk/modules/images/class/WideImage/OperationFactory.php XoopsModules/images/trunk/modules/images/class/WideImage/PaletteImage.php XoopsModules/images/trunk/modules/images/class/WideImage/README XoopsModules/images/trunk/modules/images/class/WideImage/TrueColorImage.php XoopsModules/images/trunk/modules/images/class/WideImage/VERSION XoopsModules/images/trunk/modules/images/class/WideImage/WideImage.php XoopsModules/images/trunk/modules/images/class/WideImage/gpl.txt XoopsModules/images/trunk/modules/images/class/WideImage/lgpl.txt XoopsModules/images/trunk/modules/images/class/WideImage/vendor/ XoopsModules/images/trunk/modules/images/class/WideImage/vendor/de77/ XoopsModules/images/trunk/modules/images/class/WideImage/vendor/de77/BMP.php XoopsModules/images/trunk/modules/images/class/WideImage/vendor/de77/TGA.php XoopsModules/images/trunk/modules/images/class/ascii/ XoopsModules/images/trunk/modules/images/class/ascii/engine.php XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ascii_engine.php XoopsModules/images/trunk/modules/images/class/ascii/php7.0/php7.0.php XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ascii_engine.php XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/text-image.com.php XoopsModules/images/trunk/modules/images/class/images.php XoopsModules/images/trunk/modules/images/class/objects.php XoopsModules/images/trunk/modules/images/class/xcp/ XoopsModules/images/trunk/modules/images/class/xcp/xcp.base.php XoopsModules/images/trunk/modules/images/class/xcp/xcp.class.php XoopsModules/images/trunk/modules/images/class/xcp/xcp.enumerator.php XoopsModules/images/trunk/modules/images/class/xcp/xcp.leaver.php XoopsModules/images/trunk/modules/images/crons/ XoopsModules/images/trunk/modules/images/footer.php XoopsModules/images/trunk/modules/images/header.php XoopsModules/images/trunk/modules/images/images/ XoopsModules/images/trunk/modules/images/include/ XoopsModules/images/trunk/modules/images/include/enumerators/ XoopsModules/images/trunk/modules/images/include/enumerators/index.html XoopsModules/images/trunk/modules/images/include/enumerators/storage__images.diz XoopsModules/images/trunk/modules/images/include/enumerators/type__images.diz XoopsModules/images/trunk/modules/images/include/functions.php XoopsModules/images/trunk/modules/images/include/index.html XoopsModules/images/trunk/modules/images/language/ XoopsModules/images/trunk/modules/images/language/english/ XoopsModules/images/trunk/modules/images/language/english/admin.php XoopsModules/images/trunk/modules/images/language/english/forms.php XoopsModules/images/trunk/modules/images/language/english/index.html XoopsModules/images/trunk/modules/images/language/english/mail_templates/ XoopsModules/images/trunk/modules/images/language/english/main.php XoopsModules/images/trunk/modules/images/language/english/modinfo.php XoopsModules/images/trunk/modules/images/language/english/release.nfo XoopsModules/images/trunk/modules/images/language/english/release.xcode XoopsModules/images/trunk/modules/images/language/english/style.css XoopsModules/images/trunk/modules/images/preloads/ XoopsModules/images/trunk/modules/images/sql/ XoopsModules/images/trunk/modules/images/sql/index.html XoopsModules/images/trunk/modules/images/sql/mysql.sql XoopsModules/images/trunk/modules/images/templates/ XoopsModules/images/trunk/modules/images/templates/admin/ XoopsModules/images/trunk/modules/images/xoops_version.php Added: XoopsModules/images/trunk/modules/images/class/WideImage/Canvas.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/WideImage/Canvas.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/WideImage/Canvas.php 2017-08-30 18:15:02 UTC (rev 13288) @@ -0,0 +1,167 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * @package Exceptions + */ + class WideImage_NoFontException extends WideImage_Exception {} + + /** + * @package Exceptions + */ + class WideImage_InvalidFontFileException extends WideImage_Exception {} + + /** + * @package Exceptions + */ + class WideImage_InvalidCanvasMethodException extends WideImage_Exception {} + + /** + * @package WideImage + */ + class WideImage_Canvas + { + protected $handle = 0; + protected $image = null; + protected $font = null; + + /** + * Creates a canvas object that writes to the image passed as a parameter + * + * Shouldn't be used directly, use WideImage_Image::getCanvas() instead. + * + * @param WideImage_Image $img Image object + */ + function __construct($img) + { + $this->handle = $img->getHandle(); + $this->image = $img; + } + + /** + * Sets the active font. Can be an instance of + * WideImage_Font_TTF, WideImage_Font_PS, or WideImage_Font_GDF. + * + * + * + * + * @param object $font Font object to set for writeText() + */ + function setFont($font) + { + $this->font = $font; + } + + /** + * Creates and sets the current font + * + * The supported font types are: TTF/OTF, PS, and GDF. + * Font type is detected from the extension. If the $file parameter doesn't have an extension, TTF font is presumed. + * + * Note: not all parameters are supported by all fonts. + * + * @param string $file Font file name (string) + * @param int $size Font size (supported for TTF/OTF and PS fonts, ignored for GDF) + * @param int $color Text color + * @param int $bgcolor Background color (supported only for PS font, ignored for TTF and PS) + * @return mixed One of the WideImage_Font_* objects + */ + function useFont($file, $size = 12, $color = 0, $bgcolor = null) + { + $p = strrpos($file, '.'); + if ($p === false || $p < strlen($file) - 4) + $ext = 'ttf'; + else + $ext = strtolower(substr($file, $p + 1)); + + if ($ext == 'ttf' || $ext == 'otf') + $font = new WideImage_Font_TTF($file, $size, $color); + elseif ($ext == 'ps') + $font = new WideImage_Font_PS($file, $size, $color, $bgcolor); + elseif ($ext == 'gdf') + $font = new WideImage_Font_GDF($file, $color); + else + throw new WideImage_InvalidFontFileException("'$file' appears to be an invalid font file."); + + $this->setFont($font); + return $font; + } + + /** + * Write text on the image at specified position + * + * You must set a font with a call to WideImage_Canvas::setFont() prior to writing text to the image. + * + * Smart coordinates are supported for $x and $y arguments, but currently only for TTF/OTF fonts. + * + * Example: + * <code> + * $img = WideImage::load('pic.jpg'); + * $canvas = $img->getCanvas(); + * $canvas->useFont('Verdana.ttf', 16, $img->allocateColor(255, 0, 0)); + * $canvas->writeText('right', 'bottom', 'www.website.com'); + * </code> + * + * @param int $x Left + * @param int $y Top + * @param string $text Text to write + * @param int $angle The angle, defaults to 0 + */ + function writeText($x, $y, $text, $angle = 0) + { + if ($this->font === null) + throw new WideImage_NoFontException("Can't write text without a font."); + + $angle = - floatval($angle); + if ($angle < 0) + $angle = 360 + $angle; + $angle = $angle % 360; + + $this->font->writeText($this->image, $x, $y, $text, $angle); + } + + /** + * A magic method that allows you to call any PHP function that starts with "image". + * + * This is a shortcut to call custom functions on the image handle. + * + * Example: + * <code> + * $img = WideImage::load('pic.jpg'); + * $canvas = $img->getCanvas(); + * $canvas->filledRect(10, 10, 20, 30, $img->allocateColor(0, 0, 0)); + * $canvas->line(60, 80, 30, 100, $img->allocateColor(255, 0, 0)); + * </code> + */ + function __call($method, $params) + { + if (function_exists('image' . $method)) + { + array_unshift($params, $this->handle); + call_user_func_array('image' . $method, $params); + } + else + throw new WideImage_InvalidCanvasMethodException("Function doesn't exist: image{$method}."); + } + } Property changes on: XoopsModules/images/trunk/modules/images/class/WideImage/Canvas.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/WideImage/Coordinate.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/WideImage/Coordinate.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/WideImage/Coordinate.php 2017-08-30 18:15:02 UTC (rev 13288) @@ -0,0 +1,208 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package Internals + **/ + + + /** + * @package Exceptions + */ + class WideImage_InvalidCoordinateException extends WideImage_Exception {} + + /** + * A utility class for smart coordinates + * + * @package Internals + **/ + class WideImage_Coordinate + { + static protected $coord_align = array("left", "center", "right", "top", "middle", "bottom"); + static protected $coord_numeric = array("[0-9]+", "[0-9]+\.[0-9]+", "[0-9]+%", "[0-9]+\.[0-9]+%"); + + /** + * Parses a numeric or string representation of a corrdinate into a structure + * + * @param string $coord Smart coordinate + * @return array Parsed smart coordinate + */ + static function parse($c) + { + $tokens = array(); + $operators = array('+', '-'); + + $flush_operand = false; + $flush_operator = false; + $current_operand = ''; + $current_operator = ''; + $coordinate = strval($c); + $expr_len = strlen($coordinate); + + for ($i = 0; $i < $expr_len; $i++) + { + $char = $coordinate[$i]; + + if (in_array($char, $operators)) + { + $flush_operand = true; + $flush_operator = true; + $current_operator = $char; + } + else + { + $current_operand .= $char; + if ($i == $expr_len - 1) + $flush_operand = true; + } + + if ($flush_operand) + { + if (trim($current_operand) != '') + $tokens[] = array('type' => 'operand', 'value' => trim($current_operand)); + + $current_operand = ''; + $flush_operand = false; + } + + if ($flush_operator) + { + $tokens[] = array('type' => 'operator', 'value' => $char); + $flush_operator = false; + } + } + return $tokens; + } + + /** + * Evaluates the $coord relatively to $dim + * + * @param string $coord A numeric value or percent string + * @param int $dim Dimension + * @param int $sec_dim Secondary dimension (for align) + * @return int Calculated value + */ + static function evaluate($coord, $dim, $sec_dim = null) + { + $comp_regex = implode('|', self::$coord_align) . '|' . implode('|', self::$coord_numeric); + if (preg_match("/^([+-])?({$comp_regex})$/", $coord, $matches)) + { + $sign = intval($matches[1] . "1"); + $val = $matches[2]; + if (in_array($val, self::$coord_align)) + { + if ($sec_dim === null) + { + switch ($val) + { + case 'left': + case 'top': + return 0; + break; + case 'center': + case 'middle': + return $sign * intval($dim / 2); + break; + case 'right': + case 'bottom': + return $sign * $dim; + break; + default: + return null; + } + } + else + { + switch ($val) + { + case 'left': + case 'top': + return 0; + break; + case 'center': + case 'middle': + return $sign * intval($dim / 2 - $sec_dim / 2); + break; + case 'right': + case 'bottom': + return $sign * ($dim - $sec_dim); + break; + default: + return null; + } + } + } + elseif (substr($val, -1) === '%') + return intval(round($sign * $dim * floatval(str_replace('%', '', $val)) / 100)); + else + return $sign * intval(round($val)); + } + } + + /** + * Calculates and fixes a smart coordinate into a numeric value + * + * @param mixed $value Smart coordinate, relative to $dim + * @param int $dim Coordinate to which $value is relative + * @param int $sec_dim Secondary dimension (for align) + * @return int Calculated value + */ + static function fix($value, $dim, $sec_dim = null) + { + $coord_tokens = self::parse($value); + + if (count($coord_tokens) == 0 || $coord_tokens[count($coord_tokens) - 1]['type'] != 'operand') + throw new WideImage_InvalidCoordinateException("Couldn't parse coordinate '$value' properly."); + + $value = 0; + $operation = 1; + foreach ($coord_tokens as $token) + { + if ($token['type'] == 'operand') + { + $operand_value = self::evaluate($token['value'], $dim, $sec_dim); + if ($operation == 1) + $value = $value + $operand_value; + elseif ($operation == -1) + $value = $value - $operand_value; + else + throw new WideImage_InvalidCoordinateException("Invalid coordinate syntax."); + + $operation = 0; + } + elseif ($token['type'] == 'operator') + { + if ($token['value'] == '-') + { + if ($operation == 0) + $operation = -1; + else + $operation = $operation * -1; + } + elseif ($token['value'] == '+') + { + if ($operation == 0) + $operation = '1'; + } + } + } + return $value; + } + } Property changes on: XoopsModules/images/trunk/modules/images/class/WideImage/Coordinate.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/WideImage/Exception.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/WideImage/Exception.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/WideImage/Exception.php 2017-08-30 18:15:02 UTC (rev 13288) @@ -0,0 +1,31 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * Base Exception class + * + * @package Exceptions + **/ + class WideImage_Exception extends RuntimeException {} + \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/class/WideImage/Exception.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/WideImage/Font/GDF.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/WideImage/Font/GDF.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/WideImage/Font/GDF.php 2017-08-30 18:15:02 UTC (rev 13288) @@ -0,0 +1,48 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * GDF font support class + * + * @package WideImage + */ + class WideImage_Font_GDF + { + protected $font; + protected $color; + + function __construct($face, $color) + { + if (is_int($face) && $face >= 1 && $face <= 5) + $this->font = $face; + else + $this->font = imageloadfont($face); + $this->color = $color; + } + + function writeText($image, $x, $y, $text) + { + imagestring($image->getHandle(), $this->font, $x, $y, $text, $this->color); + } + } Property changes on: XoopsModules/images/trunk/modules/images/class/WideImage/Font/GDF.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/WideImage/Font/PS.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/WideImage/Font/PS.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/WideImage/Font/PS.php 2017-08-30 18:15:02 UTC (rev 13288) @@ -0,0 +1,60 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * PS font support class + * + * @package WideImage + */ + class WideImage_Font_PS + { + public $size; + public $color; + public $handle; + + function __construct($file, $size, $color, $bgcolor = null) + { + $this->handle = imagepsloadfont($file); + $this->size = $size; + $this->color = $color; + if ($bgcolor === null) + $this->bgcolor = $color; + else + $this->color = $color; + } + + function writeText($image, $x, $y, $text, $angle = 0) + { + if ($image->isTrueColor()) + $image->alphaBlending(true); + + imagepstext($image->getHandle(), $text, $this->handle, $this->size, $this->color, $this->bgcolor, $x, $y, 0, 0, $angle, 4); + } + + function __destruct() + { + imagepsfreefont($this->handle); + $this->handle = null; + } + } Property changes on: XoopsModules/images/trunk/modules/images/class/WideImage/Font/PS.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/WideImage/Font/TTF.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/WideImage/Font/TTF.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/WideImage/Font/TTF.php 2017-08-30 18:15:02 UTC (rev 13288) @@ -0,0 +1,75 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * TTF font support class + * + * @package WideImage + */ + class WideImage_Font_TTF + { + public $face; + public $size; + public $color; + + function __construct($face, $size, $color) + { + $this->face = $face; + $this->size = $size; + $this->color = $color; + } + + /** + * Writes text onto an image + * + * @param WideImage_Image $image + * @param mixed $x smart coordinate + * @param mixed $y smart coordinate + * @param string $text + * @param int $angle Angle in degrees clockwise + */ + function writeText($image, $x, $y, $text, $angle = 0) + { + if ($image->isTrueColor()) + $image->alphaBlending(true); + + $box = imageftbbox($this->size, $angle, $this->face, $text); + $obox = array( + 'left' => min($box[0], $box[2], $box[4], $box[6]), + 'top' => min($box[1], $box[3], $box[5], $box[7]), + 'right' => max($box[0], $box[2], $box[4], $box[6]) - 1, + 'bottom' => max($box[1], $box[3], $box[5], $box[7]) - 1 + ); + $obox['width'] = abs($obox['left']) + abs($obox['right']); + $obox['height'] = abs($obox['top']) + abs($obox['bottom']); + + $x = WideImage_Coordinate::fix($x, $image->getWidth(), $obox['width']); + $y = WideImage_Coordinate::fix($y, $image->getHeight(), $obox['height']); + + $fixed_x = $x - $obox['left']; + $fixed_y = $y - $obox['top']; + + imagettftext($image->getHandle(), $this->size, $angle, $fixed_x, $fixed_y, $this->color, $this->face, $text); + } + } Property changes on: XoopsModules/images/trunk/modules/images/class/WideImage/Font/TTF.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/WideImage/Image.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/WideImage/Image.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/WideImage/Image.php 2017-08-30 18:15:02 UTC (rev 13288) @@ -0,0 +1,964 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * Thrown when an invalid dimension is passed for some operations + * + * @package Exceptions + */ + class WideImage_InvalidImageDimensionException extends WideImage_Exception {} + + /** + * Thrown when an image can't be saved (returns false by the mapper) + * + * @package Exceptions + */ + class WideImage_UnknownErrorWhileMappingException extends WideImage_Exception {} + + /** + * Base class for images + * + * @package WideImage + */ + abstract class WideImage_Image + { + /** + * Holds the image resource + * @var resource + */ + protected $handle = null; + + /** + * Flag that determines if WideImage should call imagedestroy() upon object destruction + * @var bool + */ + protected $handleReleased = false; + + /** + * Canvas object + * @var WideImage_Canvas + */ + protected $canvas = null; + + /** + * @var string + */ + protected $sdata = null; + + /** + * The base class constructor + * + * @param resource $handle Image handle (GD2 resource) + */ + function __construct($handle) + { + WideImage::assertValidImageHandle($handle); + $this->handle = $handle; + } + + /** + * Cleanup + * + * Destroys the handle via WideImage_Image::destroy() when called by the GC. + */ + function __destruct() + { + $this->destroy(); + } + + /** + * This method destroy the image handle, and releases the image resource. + * + * After this is called, the object doesn't hold a valid image any more. + * No operation should be called after that. + */ + function destroy() + { + if ($this->isValid() && !$this->handleReleased) + imagedestroy($this->handle); + + $this->handle = null; + } + + /** + * Returns the GD image resource + * + * @return resource GD image resource + */ + function getHandle() + { + return $this->handle; + } + + /** + * @return bool True, if the image object holds a valid GD image, false otherwise + */ + function isValid() + { + return WideImage::isValidImageHandle($this->handle); + } + + /** + * Releases the handle + */ + function releaseHandle() + { + $this->handleReleased = true; + } + + /** + * Saves an image to a file + * + * The file type is recognized from the $uri. If you save to a GIF8, truecolor images + * are automatically converted to palette. + * + * This method supports additional parameters: quality (for jpeg images) and + * compression quality and filters (for png images). See http://www.php.net/imagejpeg and + * http://www.php.net/imagepng for details. + * + * Examples: + * <code> + * // save to a GIF + * $image->saveToFile('image.gif'); + * + * // save to a PNG with compression=7 and no filters + * $image->saveToFile('image.png', 7, PNG_NO_FILTER); + * + * // save to a JPEG with quality=80 + * $image->saveToFile('image.jpg', 80); + * + * // save to a JPEG with default quality=100 + * $image->saveToFile('image.jpg'); + * </code> + * + * @param string $uri File location + */ + function saveToFile($uri) + { + $mapper = WideImage_MapperFactory::selectMapper($uri, null); + $args = func_get_args(); + array_unshift($args, $this->getHandle()); + $res = call_user_func_array(array($mapper, 'save'), $args); + if (!$res) + throw new WideImage_UnknownErrorWhileMappingException(get_class($mapper) . " returned an invalid result while saving to $uri"); + } + + /** + * Returns binary string with image data in format specified by $format + * + * Additional parameters may be passed to the function. See WideImage_Image::saveToFile() for more details. + * + * @param string $format The format of the image + * @return string The binary image data in specified format + */ + function asString($format) + { + ob_start(); + $args = func_get_args(); + $args[0] = null; + array_unshift($args, $this->getHandle()); + + $mapper = WideImage_MapperFactory::selectMapper(null, $format); + $res = call_user_func_array(array($mapper, 'save'), $args); + if (!$res) + throw new WideImage_UnknownErrorWhileMappingException(get_class($mapper) . " returned an invalid result while writing the image data"); + + return ob_get_clean(); + } + + /** + * Output a header to browser. + * + * @param $name Name of the header + * @param $data Data + */ + protected function writeHeader($name, $data) + { + header($name . ": " . $data); + } + + /** + * Outputs the image to browser + * + * Sets headers Content-length and Content-type, and echoes the image in the specified format. + * All other headers (such as Content-disposition) must be added manually. + * + * Example: + * <code> + * WideImage::load('image1.png')->resize(100, 100)->output('gif'); + * </code> + * + * @param string $format Image format + */ + function output($format) + { + $args = func_get_args(); + $data = call_user_func_array(array($this, 'asString'), $args); + + $this->writeHeader('Content-length', strlen($data)); + $this->writeHeader('Content-type', WideImage_MapperFactory::mimeType($format)); + echo $data; + } + + /** + * @return int Image width + */ + function getWidth() + { + return imagesx($this->handle); + } + + /** + * @return int Image height + */ + function getHeight() + { + return imagesy($this->handle); + } + + /** + * Allocate a color by RGB values. + * + * @param mixed $R Red-component value or an RGB array (with red, green, blue keys) + * @param int $G If $R is int, this is the green component + * @param int $B If $R is int, this is the blue component + * @return int Image color index + */ + function allocateColor($R, $G = null, $B = null) + { + if (is_array($R)) + return imageColorAllocate($this->handle, $R['red'], $R['green'], $R['blue']); + else + return imageColorAllocate($this->handle, $R, $G, $B); + } + + /** + * @return bool True if the image is transparent, false otherwise + */ + function isTransparent() + { + return $this->getTransparentColor() >= 0; + } + + /** + * @return int Transparent color index + */ + function getTransparentColor() + { + return imagecolortransparent($this->handle); + } + + /** + * Sets the current transparent color index. Only makes sense for palette images (8-bit). + * + * @param int $color Transparent color index + */ + function setTransparentColor($color) + { + return imagecolortransparent($this->handle, $color); + } + + /** + * Returns a RGB array of the transparent color or null if none. + * + * @return mixed Transparent color RGBA array + */ + function getTransparentColorRGB() + { + $total = imagecolorstotal($this->handle); + $tc = $this->getTransparentColor(); + + if ($tc >= $total && $total > 0) + return null; + else + return $this->getColorRGB($tc); + } + + /** + * Returns a RGBA array for pixel at $x, $y + * + * @param int $x + * @param int $y + * @return array RGB array + */ + function getRGBAt($x, $y) + { + return $this->getColorRGB($this->getColorAt($x, $y)); + } + + /** + * Writes a pixel at the designated coordinates + * + * Takes an associative array of colours and uses getExactColor() to + * retrieve the exact index color to write to the image with. + * + * @param int $x + * @param int $y + * @param array $color + */ + function setRGBAt($x, $y, $color) + { + $this->setColorAt($x, $y, $this->getExactColor($color)); + } + + /** + * Returns a color's RGB + * + * @param int $colorIndex Color index + * @return mixed RGBA array for a color with index $colorIndex + */ + function getColorRGB($colorIndex) + { + return imageColorsForIndex($this->handle, $colorIndex); + } + + /** + * Returns an index of the color at $x, $y + * + * @param int $x + * @param int $y + * @return int Color index for a pixel at $x, $y + */ + function getColorAt($x, $y) + { + return imagecolorat($this->handle, $x, $y); + } + + /** + * Set the color index $color to a pixel at $x, $y + * + * @param int $x + * @param int $y + * @param int $color Color index + */ + function setColorAt($x, $y, $color) + { + return imagesetpixel($this->handle, $x, $y, $color); + } + + /** + * Returns closest color index that matches the given RGB value. Uses + * PHP's imagecolorclosest() + * + * @param mixed $R Red or RGBA array + * @param int $G Green component (or null if $R is an RGB array) + * @param int $B Blue component (or null if $R is an RGB array) + * @return int Color index + */ + function getClosestColor($R, $G = null, $B = null) + { + if (is_array($R)) + return imagecolorclosest($this->handle, $R['red'], $R['green'], $R['blue']); + else + return imagecolorclosest($this->handle, $R, $G, $B); + } + + /** + * Returns the color index that exactly matches the given RGB value. Uses + * PHP's imagecolorexact() + * + * @param mixed $R Red or RGBA array + * @param int $G Green component (or null if $R is an RGB array) + * @param int $B Blue component (or null if $R is an RGB array) + * @return int Color index + */ + function getExactColor($R, $G = null, $B = null) + { + if (is_array($R)) + return imagecolorexact($this->handle, $R['red'], $R['green'], $R['blue']); + else + return imagecolorexact($this->handle, $R, $G, $B); + } + + /** + * Copies transparency information from $sourceImage. Optionally fills + * the image with the transparent color at (0, 0). + * + * @param object $sourceImage + * @param bool $fill True if you want to fill the image with transparent color + */ + function copyTransparencyFrom($sourceImage, $fill = true) + { + if ($sourceImage->isTransparent()) + { + $rgba = $sourceImage->getTransparentColorRGB(); + if ($rgba === null) + return; + + if ($this->isTrueColor()) + { + $rgba['alpha'] = 127; + $color = $this->allocateColorAlpha($rgba); + } + else + $color = $this->allocateColor($rgba); + + $this->setTransparentColor($color); + if ($fill) + $this->fill(0, 0, $color); + } + } + + /** + * Fill the image at ($x, $y) with color index $color + * + * @param int $x + * @param int $y + * @param int $color + */ + function fill($x, $y, $color) + { + return imagefill($this->handle, $x, $y, $color); + } + + /** + * Used internally to create Operation objects + * + * @param string $name + * @return object + */ + protected function getOperation($name) + { + return WideImage_OperationFactory::get($name); + } + + /** + * Returns the image's mask + * + * Mask is a greyscale image where the shade defines the alpha channel (black = transparent, white = opaque). + * + * For opaque images (JPEG), the result will be white. For images with single-color transparency (GIF, 8-bit PNG), + * the areas with the transparent color will be black. For images with alpha channel transparenct, + * the result will be alpha channel. + * + * @return WideImage_Image An image mask + **/ + function getMask() + { + return $this->getOperation('GetMask')->execute($this); + } + + /** + * Resize the image to given dimensions. + * + * $width and $height are both smart coordinates. This means that you can pass any of these values in: + * - positive or negative integer (100, -20, ...) + * - positive or negative percent string (30%, -15%, ...) + * - complex coordinate (50% - 20, 15 + 30%, ...) + * + * If $width is null, it's calculated proportionally from $height, and vice versa. + * + * Example (resize to half-size): + * <code> + * $smaller = $image->resize('50%'); + * + * $smaller = $image->resize('100', '100', 'inside', 'down'); + * is the same as + * $smaller = $image->resizeDown(100, 100, 'inside'); + * </code> + * + * @param mixed $width The new width (smart coordinate), or null. + * @param mixed $height The new height (smart coordinate), or null. + * @param string $fit 'inside', 'outside', 'fill' + * @param string $scale 'down', 'up', 'any' + * @return WideImage_Image The resized image + */ + function resize($width = null, $height = null, $fit = 'inside', $scale = 'any') + { + return $this->getOperation('Resize')->execute($this, $width, $height, $fit, $scale); + } + + /** + * Same as WideImage_Image::resize(), but the image is only applied if it is larger then the given dimensions. + * Otherwise, the resulting image retains the source's dimensions. + * + * @param int $width New width, smart coordinate + * @param int $height New height, smart coordinate + * @param string $fit 'inside', 'outside', 'fill' + * @return WideImage_Image resized image + */ + function resizeDown($width = null, $height = null, $fit = 'inside') + { + return $this->resize($width, $height, $fit, 'down'); + } + + /** + * Same as WideImage_Image::resize(), but the image is only applied if it is smaller then the given dimensions. + * Otherwise, the resulting image retains the source's dimensions. + * + * @param int $width New width, smart coordinate + * @param int $height New height, smart coordinate + * @param string $fit 'inside', 'outside', 'fill' + * @return WideImage_Image resized image + */ + function resizeUp($width = null, $height = null, $fit = 'inside') + { + return $this->resize($width, $height, $fit, 'up'); + } + + /** + * Rotate the image for angle $angle clockwise. + * + * Preserves transparency. Has issues when saving to a BMP. + * + * @param int $angle Angle in degrees, clock-wise + * @param int $bgColor color of the new background + * @param bool $ignoreTransparent + * @return WideImage_Image The rotated image + */ + function rotate($angle, $bgColor = null, $ignoreTransparent = true) + { + return $this->getOperation('Rotate')->execute($this, $angle, $bgColor, $ignoreTransparent); + } + + /** + * This method lays the overlay (watermark) on the image. + * + * Hint: if the overlay is a truecolor image with alpha channel, you should leave $pct at 100. + * + * This operation supports alignment notation in coordinates: + * <code> + * $watermark = WideImage::load('logo.gif'); + * $base = WideImage::load('picture.jpg'); + * $result = $base->merge($watermark, "right - 10", "bottom - 10", 50); + * // applies a logo aligned to bottom-right corner with a 10 pixel margin + * </code> + * + * @param WideImage_Image $overlay The overlay image + * @param mixed $left Left position of the overlay, smart coordinate + * @param mixed $top Top position of the overlay, smart coordinate + * @param int $pct The opacity of the overlay + * @return WideImage_Image The merged image + */ + function merge($overlay, $left = 0, $top = 0, $pct = 100) + { + return $this->getOperation('Merge')->execute($this, $overlay, $left, $top, $pct); + } + + /** + * Resizes the canvas of the image, but doesn't scale the content of the image + * + * This operation creates an empty canvas with dimensions $width x $height, filled with + * background color $bg_color and draws the original image onto it at position [$pos_x, $pos_y]. + * + * Arguments $width, $height, $pos_x and $pos_y are all smart coordinates. $width and $height are + * relative to the current image size, $pos_x and $pos_y are relative to the newly calculated + * canvas size. This can be confusing, but it makes sense. See the example below. + * + * The example below loads a 100x150 image and then resizes its canvas to 200% x 100%+20 + * (which evaluates to 200x170). The image is placed at position [10, center+20], which evaluates to [10, 30]. + * <code> + * $image = WideImage::load('someimage.jpg'); // 100x150 + * $white = $image->allocateColor(255, 255, 255); + * $image->resizeCanvas('200%', '100% + 20', 10, 'center+20', $white); + * </code> + * + * The parameter $merge defines whether the original image should be merged onto the new canvas. + * This means it blends transparent color and alpha colors into the background color. If set to false, + * the original image is just copied over, preserving the transparency/alpha information. + * + * You can set the $scale parameter to limit when to resize the canvas. For example, if you want + * to resize the canvas only if the image is smaller than the new size, but leave the image intact + * if it's larger, set it to 'up'. Likewise, if you want to shrink the canvas, but don't want to + * change images that are already smaller, set it to 'down'. + * + * @param mixed $width Width of the new canvas (smart coordinate, relative to current image width) + * @param mixed $height Height of the new canvas (smart coordinate, relative to current image height) + * @param mixed $pos_x x-position of the image (smart coordinate, relative to the new width) + * @param mixed $pos_y y-position of the image (smart coordinate, relative to the new height) + * @param int $bg_color Background color (created with allocateColor or allocateColorAlpha), defaults to null (tries to use a transparent color) + * @param string $scale Possible values: 'up' (enlarge only), 'down' (downsize only), 'any' (resize precisely to $width x $height). Defaults to 'any'. + * @param bool $merge Merge the original image (flatten alpha channel and transparency) or copy it over (preserve). Defaults to false. + * @return WideImage_Image The resulting image with resized canvas + */ + function resizeCanvas($width, $height, $pos_x, $pos_y, $bg_color = null, $scale = 'any', $merge = false) + { + return $this->getOperation('ResizeCanvas')->execute($this, $width, $height, $pos_x, $pos_y, $bg_color, $scale, $merge); + } + + /** + * Returns an image with round corners + * + * You can either set the corners' color or set them transparent. + * + * Note on $smoothness: 1 means jagged edges, 2 is much better, more than 4 doesn't noticeably improve the quality. + * Rendering becomes increasingly slower if you increase smoothness. + * + * Example: + * <code> + * $nice = $ugly->roundCorners(20, $ugly->allocateColor(255, 0, 0), 2); + * </code> + * + * Use $corners parameter to specify which corners to draw rounded. Possible values are + * WideImage::SIDE_TOP_LEFT, WideImage::SIDE_TOP, + * WideImage::SIDE_TOP_RIGHT, WideImage::SIDE_RIGHT, + * WideImage::SIDE_BOTTOM_RIGHT, WideImage::SIDE_BOTTOM, + * WideImage::SIDE_BOTTOM_LEFT, WideImage::SIDE_LEFT, and WideImage::SIDE_ALL. + * You can specify any combination of corners with a + operation, see example below. + * + * Example: + * <code> + * $white = $image->allocateColor(255, 255, 255); + * $diagonal_corners = $image->roundCorners(15, $white, 2, WideImage::SIDE_TOP_LEFT + WideImage::SIDE_BOTTOM_RIGHT); + * $right_corners = $image->roundCorners(15, $white, 2, WideImage::SIDE_RIGHT); + * </code> + * + * @param int $radius Radius of the corners + * @param int $color The color of corners. If null, corners are rendered transparent (slower than using a solid color). + * @param int $smoothness Specify the level of smoothness. Suggested values from 1 to 4. + * @param int $corners Specify which corners to draw (defaults to WideImage::SIDE_ALL = all corners) + * @return WideImage_Image The resulting image with round corners + */ + function roundCorners($radius, $color = null, $smoothness = 2, $corners = 255) + { + return $this->getOperation('RoundCorners')->execute($this, $radius, $color, $smoothness, $corners); + } + + /** + * Returns an image with applied mask + * + * A mask is a grayscale image, where the shade determines the alpha channel. Black is fully transparent + * and white is fully opaque. + * + * @param WideImage_Image $mask The mask image, greyscale + * @param mixed $left Left coordinate, smart coordinate + * @param mixed $top Top coordinate, smart coordinate + * @return WideImage_Image The resulting image + **/ + function applyMask($mask, $left = 0, $top = 0) + { + return $this->getOperation('ApplyMask')->execute($this, $mask, $left, $top); + } + + /** + * Applies a filter + * + * @param int $filter One of the IMG_FILTER_* constants + * @param int $arg1 + * @param int $arg2 + * @param int $arg3 + * @param int $arg4 + * @return WideImage_Image + */ + function applyFilter($filter, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null) + { + return $this->getOperation('ApplyFilter')->execute($this, $filter, $arg1, $arg2, $arg3, $arg4); + } + + /** + * Applies convolution matrix with imageconvolution() + * + * @param array $matrix + * @param float $div + * @param float $offset + * @return WideImage_Image + */ + function applyConvolution($matrix, $div, $offset) + { + return $this->getOperation('ApplyConvolution')->execute($this, $matrix, $div, $offset); + } + + /** + * Returns a cropped rectangular portion of the image + * + * If the rectangle specifies area that is out of bounds, it's limited to the current image bounds. + * + * Examples: + * <code> + * $cropped = $img->crop(10, 10, 150, 200); // crops a 150x200 rect at (10, 10) + * $cropped = $img->crop(-100, -50, 100, 50); // crops a 100x50 rect at the right-bottom of the image + * $cropped = $img->crop('25%', '25%', '50%', '50%'); // crops a 50%x50% rect from the center of the image + * </code> + * + * This operation supports alignment notation in left/top coordinates. + * Example: + * <code> + * $cropped = $img->crop("right", "bottom", 100, 200); // crops a 100x200 rect from right bottom + * $cropped = $img->crop("center", "middle", 50, 30); // crops a 50x30 from the center of the image + * </code> + * + * @param mixed $left Left-coordinate of the crop rect, smart coordinate + * @param mixed $top Top-coordinate of the crop rect, smart coordinate + * @param mixed $width Width of the crop rect, smart coordinate + * @param mixed $height Height of the crop rect, smart coordinate + * @return WideImage_Image The cropped image + **/ + function crop($left = 0, $top = 0, $width = '100%', $height = '100%') + { + return $this->getOperation('Crop')->execute($this, $left, $top, $width, $height); + } + + /** + * Performs an auto-crop on the image + * + * The image is auto-cropped from each of four sides. All sides are + * scanned for pixels that differ from $base_color for more than + * $rgb_threshold in absolute RGB difference. If more than $pixel_cutoff + * differentiating pixels are found, that line is considered to be the crop line for the side. + * If the line isn't different enough, the algorithm procedes to the next line + * towards the other edge of the image. + * + * When the crop rectangle is found, it's enlarged by the $margin value on each of the four sides. + * + * @param int $margin Margin for the crop rectangle, can be negative. + * @param int $rgb_threshold RGB difference which still counts as "same color". + * @param int $pixel_cutoff How many pixels need to be different to mark a cut line. + * @param int $base_color The base color index. If none specified (or null given), left-top pixel is used. + * @return WideImage_Image The cropped image + */ + function autoCrop($margin = 0, $rgb_threshold = 0, $pixel_cutoff = 1, $base_color = null) + { + return $this->getOperation('AutoCrop')->execute($this, $margin, $rgb_threshold, $pixel_cutoff, $base_color); + } + + /** + * Returns a negative of the image + * + * This operation differs from calling WideImage_Image::applyFilter(IMG_FILTER_NEGATIVE), because it's 8-bit and transparency safe. + * This means it will return an 8-bit image, if the source image is 8-bit. If that 8-bit image has a palette transparency, + * the resulting image will keep transparency. + * + * @return WideImage_Image negative of the image + */ + function asNegative() + { + return $this->getOperation('AsNegative')->execute($this); + } + + /** + * Returns a grayscale copy of the image + * + * @return WideImage_Image grayscale copy + **/ + function asGrayscale() + { + return $this->getOperation('AsGrayscale')->execute($this); + } + + /** + * Returns a mirrored copy of the image + * + * @return WideImage_Image Mirrored copy + **/ + function mirror() + { + return $this->getOperation('Mirror')->execute($this); + } + + /** + * Applies the unsharp filter + * + * @param float $amount + * @param float $radius + * @param float $threshold + * @return WideImage_Image Unsharpened copy of the image + **/ + function unsharp($amount, $radius, $threshold) + { + return $this->getOperation('Unsharp')->execute($this, $amount, $radius, $threshold); + } + + /** + * Returns a flipped (mirrored over horizontal line) copy of the image + * + * @return WideImage_Image Flipped copy + **/ + function flip() + { + return $this->getOperation('Flip')->execute($this); + } + + /** + * Corrects gamma on the image + * + * @param float $inputGamma + * @param float $outputGamma + * @return WideImage_Image Image with corrected gamma + **/ + function correctGamma($inputGamma, $outputGamma) + { + return $this->getOperation('CorrectGamma')->execute($this, $inputGamma, $outputGamma); + } + + /** + * Adds noise to the image + * + * @author Tomasz Kapusta + * + * @param int $amount Number of noise pixels to add + * @param string $type Type of noise 'salt&pepper', 'color' or 'mono' + * @return WideImage_Image Image with noise added + **/ + function addNoise($amount, $type) + { + return $this->getOperation('AddNoise')->execute($this, $amount, $type); + } + + /** + * Used internally to execute operations + * + * @param string $name + * @param array $args + * @return WideImage_Image + */ + function __call($name, $args) + { + $op = $this->getOperation($name); + array_unshift($args, $this); + return call_user_func_array(array($op, 'execute'), $args); + } + + /** + * Returns an image in GIF or PNG format + * + * @return string + */ + function __toString() + { + if ($this->isTransparent()) + return $this->asString('gif'); + else + return $this->asString('png'); + } + + /** + * Returns a copy of the image object + * + * @return WideImage_Image The copy + **/ + function copy() + { + $dest = $this->doCreate($this->getWidth(), $this->getHeight()); + $dest->copyTransparencyFrom($this, true); + $this->copyTo($dest, 0, 0); + return $dest; + } + + /** + * Copies this image onto another image + * + * @param WideImage_Image $dest + * @param int $left + * @param int $top + **/ + function copyTo($dest, $left = 0, $top = 0) + { + if (!imagecopy($dest->getHandle(), $this->handle, $left, $top, 0, 0, $this->getWidth(), $this->getHeight())) + throw new WideImage_GDFunctionResultException("imagecopy() returned false"); + } + + /** + * Returns the canvas object + * + * The Canvas object can be used to draw text and shapes on the image + * + * Examples: + * <code> + * $img = WideImage::load('pic.jpg); + * $canvas = $img->getCanvas(); + * $canvas->useFont('arial.ttf', 15, $img->allocateColor(200, 220, 255)); + * $canvas->writeText(10, 50, "Hello world!"); + * + * $canvas->filledRectangle(10, 10, 80, 40, $img->allocateColor(255, 127, 255)); + * $canvas->line(60, 80, 30, 100, $img->allocateColor(255, 0, 0)); + * $img->saveToFile('new.png'); + * </code> + * + * @return WideImage_Canvas The Canvas object + **/ + function getCanvas() + { + if ($this->canvas == null) + $this->canvas = new WideImage_Canvas($this); + return $this->canvas; + } + + /** + * Returns true if the image is true-color, false otherwise + * + * @return bool + **/ + abstract function isTrueColor(); + + /** + * Returns a true-color copy of the image + * + * @return WideImage_TrueColorImage + **/ + abstract function asTrueColor(); + + /** + * Returns a palette copy (8bit) of the image + * + * @param int $nColors Number of colors in the resulting image, more than 0, less or equal to 255 + * @param bool $dither Use dithering or not + * @param bool $matchPalette Set to true to use imagecolormatch() to match the resulting palette more closely to the original image + * @return WideImage_Image + **/ + abstract function asPalette($nColors = 255, $dither = null, $matchPalette = true); + + /** + * Retrieve an image with selected channels + * + * Examples: + * <code> + * $channels = $img->getChannels('red', 'blue'); + * $channels = $img->getChannels('alpha', 'green'); + * $channels = $img->getChannels(array('green', 'blue')); + * </code> + * + * @return WideImage_Image + **/ + abstract function getChannels(); + + /** + * Returns an image without an alpha channel + * + * @return WideImage_Image + **/ + abstract function copyNoAlpha(); + + /** + * Returns an array of serializable protected variables. Called automatically upon serialize(). + * + * @return array + */ + function __sleep() + { + $this->sdata = $this->asString('png'); + return array('sdata', 'handleReleased'); + } + + /** + * Restores an image from serialization. Called automatically upon unserialize(). + */ + function __wakeup() + { + $temp_image = WideImage::loadFromString($this->sdata); + $temp_image->releaseHandle(); + $this->handle = $temp_image->handle; + $temp_image = null; + $this->sdata = null; + } + } Property changes on: XoopsModules/images/trunk/modules/images/class/WideImage/Image.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/BMP.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/BMP.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/WideImage/Mapper/BMP.php 2017-08-30 18:15:02 UTC (rev 13288) @@ -0,0 +1,51 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details.... [truncated message content] |
From: <wis...@us...> - 2017-08-30 09:02:15
|
Revision: 13287 http://sourceforge.net/p/xoops/svn/13287 Author: wishcraft Date: 2017-08-30 09:02:09 +0000 (Wed, 30 Aug 2017) Log Message: ----------- xoops_version.php updated too XOOPS 2.6 Standard! Modified Paths: -------------- XoopsModules/tag/trunk/README.md XoopsModules/tag/trunk/modules/tag/class/categories.php XoopsModules/tag/trunk/modules/tag/class/link.php XoopsModules/tag/trunk/modules/tag/class/tag.php XoopsModules/tag/trunk/modules/tag/include/htaccess.txt XoopsModules/tag/trunk/modules/tag/index.php XoopsModules/tag/trunk/modules/tag/language/english/modinfo.php XoopsModules/tag/trunk/modules/tag/list.cat.php XoopsModules/tag/trunk/modules/tag/list.tag.php XoopsModules/tag/trunk/modules/tag/templates/tag_category_view.html XoopsModules/tag/trunk/modules/tag/templates/tag_index.html XoopsModules/tag/trunk/modules/tag/templates/tag_view.html XoopsModules/tag/trunk/modules/tag/view.cat.php XoopsModules/tag/trunk/modules/tag/view.tag.php XoopsModules/tag/trunk/modules/tag/xoops_version.php Added Paths: ----------- XoopsModules/tag/README.md XoopsModules/tag/releases/3.05/ XoopsModules/tag/releases/3.05/README.md XoopsModules/tag/releases/3.05/modules/ XoopsModules/tag/releases/3.05/modules/tag/ XoopsModules/tag/releases/3.05/modules/tag/admin/ XoopsModules/tag/releases/3.05/modules/tag/admin/admin.tag.php XoopsModules/tag/releases/3.05/modules/tag/admin/footer.php XoopsModules/tag/releases/3.05/modules/tag/admin/header.php XoopsModules/tag/releases/3.05/modules/tag/admin/htaccess.tag.php XoopsModules/tag/releases/3.05/modules/tag/admin/index.html XoopsModules/tag/releases/3.05/modules/tag/admin/index.php XoopsModules/tag/releases/3.05/modules/tag/admin/menu.php XoopsModules/tag/releases/3.05/modules/tag/admin/plugins.tag.php XoopsModules/tag/releases/3.05/modules/tag/admin/syn.tag.php XoopsModules/tag/releases/3.05/modules/tag/backend.php XoopsModules/tag/releases/3.05/modules/tag/blocks/ XoopsModules/tag/releases/3.05/modules/tag/blocks/block.php XoopsModules/tag/releases/3.05/modules/tag/blocks/index.html XoopsModules/tag/releases/3.05/modules/tag/class/ XoopsModules/tag/releases/3.05/modules/tag/class/categories.php XoopsModules/tag/releases/3.05/modules/tag/class/categories_link.php XoopsModules/tag/releases/3.05/modules/tag/class/index.html XoopsModules/tag/releases/3.05/modules/tag/class/link.php XoopsModules/tag/releases/3.05/modules/tag/class/tag.php XoopsModules/tag/releases/3.05/modules/tag/feed.cat.php XoopsModules/tag/releases/3.05/modules/tag/feed.tag.php XoopsModules/tag/releases/3.05/modules/tag/footer.php XoopsModules/tag/releases/3.05/modules/tag/header.php XoopsModules/tag/releases/3.05/modules/tag/images/ XoopsModules/tag/releases/3.05/modules/tag/images/delete.png XoopsModules/tag/releases/3.05/modules/tag/images/delimiter.gif XoopsModules/tag/releases/3.05/modules/tag/images/edit.png XoopsModules/tag/releases/3.05/modules/tag/images/index.html XoopsModules/tag/releases/3.05/modules/tag/images/left_both.gif XoopsModules/tag/releases/3.05/modules/tag/images/mlogo.png XoopsModules/tag/releases/3.05/modules/tag/images/modadminbg.gif XoopsModules/tag/releases/3.05/modules/tag/images/right_both.gif XoopsModules/tag/releases/3.05/modules/tag/images/rss.gif XoopsModules/tag/releases/3.05/modules/tag/include/ XoopsModules/tag/releases/3.05/modules/tag/include/action.module.php XoopsModules/tag/releases/3.05/modules/tag/include/feeds.module.php XoopsModules/tag/releases/3.05/modules/tag/include/formtag.php XoopsModules/tag/releases/3.05/modules/tag/include/functions.php XoopsModules/tag/releases/3.05/modules/tag/include/htaccess.txt XoopsModules/tag/releases/3.05/modules/tag/include/index.html XoopsModules/tag/releases/3.05/modules/tag/include/plugin.php XoopsModules/tag/releases/3.05/modules/tag/include/search.inc.php XoopsModules/tag/releases/3.05/modules/tag/include/tagbar.php XoopsModules/tag/releases/3.05/modules/tag/include/vars.php XoopsModules/tag/releases/3.05/modules/tag/index.php XoopsModules/tag/releases/3.05/modules/tag/js/ XoopsModules/tag/releases/3.05/modules/tag/js/index.html XoopsModules/tag/releases/3.05/modules/tag/js/monaco/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/base/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/base/index.html XoopsModules/tag/releases/3.05/modules/tag/js/monaco/base/worker/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/base/worker/workerMain.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/index.html XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/bat.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/coffee.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/cpp.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/csharp.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/css.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/dockerfile.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/fsharp.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/go.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/handlebars.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/html.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/ini.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/java.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/less.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/lua.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/markdown.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/msdax.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/objective-c.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/php.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/postiats.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/powershell.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/pug.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/python.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/r.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/razor.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/ruby.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/scss.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/solidity.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/sql.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/swift.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/vb.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/xml.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/basic-languages/src/yaml.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/contrib/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/contrib/suggest/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/contrib/suggest/browser/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/contrib/suggest/browser/media/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/contrib/suggest/browser/media/String_16x.svg XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/contrib/suggest/browser/media/String_inverse_16x.svg XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.css XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.de.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.es.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.fr.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.hu.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.it.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.ja.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.ko.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.pt-br.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.ru.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.tr.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.zh-cn.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/editor.main.nls.zh-tw.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/index.html XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/standalone/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/standalone/browser/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/standalone/browser/quickOpen/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/editor/standalone/browser/quickOpen/symbol-sprite.svg XoopsModules/tag/releases/3.05/modules/tag/js/monaco/index.html XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/css/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/css/cssMode.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/css/cssWorker.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/html/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/html/htmlMode.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/html/htmlWorker.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/index.html XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/json/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/json/jsonMode.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/json/jsonWorker.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/typescript/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/typescript/lib/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/typescript/lib/typescriptServices.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/typescript/src/ XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/typescript/src/mode.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/language/typescript/src/worker.js XoopsModules/tag/releases/3.05/modules/tag/js/monaco/loader.js XoopsModules/tag/releases/3.05/modules/tag/js/swfobject.js XoopsModules/tag/releases/3.05/modules/tag/language/ XoopsModules/tag/releases/3.05/modules/tag/language/english/ XoopsModules/tag/releases/3.05/modules/tag/language/english/admin.php XoopsModules/tag/releases/3.05/modules/tag/language/english/blocks.css XoopsModules/tag/releases/3.05/modules/tag/language/english/blocks.php XoopsModules/tag/releases/3.05/modules/tag/language/english/config.php XoopsModules/tag/releases/3.05/modules/tag/language/english/index.html XoopsModules/tag/releases/3.05/modules/tag/language/english/main.php XoopsModules/tag/releases/3.05/modules/tag/language/english/modinfo.php XoopsModules/tag/releases/3.05/modules/tag/language/english/release.nfo XoopsModules/tag/releases/3.05/modules/tag/language/english/release.xcode XoopsModules/tag/releases/3.05/modules/tag/language/english/style.css XoopsModules/tag/releases/3.05/modules/tag/language/index.html XoopsModules/tag/releases/3.05/modules/tag/list.cat.php XoopsModules/tag/releases/3.05/modules/tag/list.tag.php XoopsModules/tag/releases/3.05/modules/tag/plugin/ XoopsModules/tag/releases/3.05/modules/tag/plugin/index.html XoopsModules/tag/releases/3.05/modules/tag/plugin/xcenter.php XoopsModules/tag/releases/3.05/modules/tag/sql/ XoopsModules/tag/releases/3.05/modules/tag/sql/index.html XoopsModules/tag/releases/3.05/modules/tag/sql/mysql.150.sql XoopsModules/tag/releases/3.05/modules/tag/sql/mysql.230.sql XoopsModules/tag/releases/3.05/modules/tag/sql/mysql.sql XoopsModules/tag/releases/3.05/modules/tag/swf/ XoopsModules/tag/releases/3.05/modules/tag/swf/cumulus.swf XoopsModules/tag/releases/3.05/modules/tag/swf/index.html XoopsModules/tag/releases/3.05/modules/tag/templates/ XoopsModules/tag/releases/3.05/modules/tag/templates/admin/ XoopsModules/tag/releases/3.05/modules/tag/templates/admin/index.html XoopsModules/tag/releases/3.05/modules/tag/templates/admin/tag_admin.html XoopsModules/tag/releases/3.05/modules/tag/templates/admin/tag_htaccess.html XoopsModules/tag/releases/3.05/modules/tag/templates/admin/tag_plugins_edit.html XoopsModules/tag/releases/3.05/modules/tag/templates/admin/tag_plugins_list.html XoopsModules/tag/releases/3.05/modules/tag/templates/blocks/ XoopsModules/tag/releases/3.05/modules/tag/templates/blocks/index.html XoopsModules/tag/releases/3.05/modules/tag/templates/blocks/tag_block_cloud.html XoopsModules/tag/releases/3.05/modules/tag/templates/blocks/tag_block_cumulus.html XoopsModules/tag/releases/3.05/modules/tag/templates/blocks/tag_block_top.html XoopsModules/tag/releases/3.05/modules/tag/templates/index.html XoopsModules/tag/releases/3.05/modules/tag/templates/tag_bar.html XoopsModules/tag/releases/3.05/modules/tag/templates/tag_category_list.html XoopsModules/tag/releases/3.05/modules/tag/templates/tag_category_view.html XoopsModules/tag/releases/3.05/modules/tag/templates/tag_index.html XoopsModules/tag/releases/3.05/modules/tag/templates/tag_list.html XoopsModules/tag/releases/3.05/modules/tag/templates/tag_rss_child.xml XoopsModules/tag/releases/3.05/modules/tag/templates/tag_rss_parent.xml XoopsModules/tag/releases/3.05/modules/tag/templates/tag_view.html XoopsModules/tag/releases/3.05/modules/tag/view.cat.php XoopsModules/tag/releases/3.05/modules/tag/view.tag.php XoopsModules/tag/releases/3.05/modules/tag/xoops_version.php XoopsModules/tag/trunk/modules/tag/backend.php XoopsModules/tag/trunk/modules/tag/feed.cat.php XoopsModules/tag/trunk/modules/tag/feed.tag.php XoopsModules/tag/trunk/modules/tag/images/rss.gif XoopsModules/tag/trunk/modules/tag/include/feeds.module.php XoopsModules/tag/trunk/modules/tag/templates/tag_rss_child.xml XoopsModules/tag/trunk/modules/tag/templates/tag_rss_parent.xml Added: XoopsModules/tag/README.md =================================================================== --- XoopsModules/tag/README.md (rev 0) +++ XoopsModules/tag/README.md 2017-08-30 09:02:09 UTC (rev 13287) @@ -0,0 +1,276 @@ +# Tag Module for XOOPS 2.5 + +## Version 2.xx (Still in Development) + +### Author: Simon Roberts <simon@snails.email> + +This module provides a centralized toolkit including input, display, stats and substantial more comprehensive applications, so that each module does not need to develop its own tag handling scripts. + +Check http://en.wikipedia.org/wiki/Tags for more info about "tag" + +# Shortened Search Engine Friendly URLS (mod_rewrite) + +The following goes in the .htaccess if your running apache2 in the XOOPS_ROOT_PATH + + RewriteEngine On + RewriteRule ^tags/index.html ./modules/tag/index.php [L,NC,QSA] + RewriteRule ^tags/index-(.*?).html ./modules/tag/index.php?dirname=$1 [L,NC,QSA] + RewriteRule ^tags/feed.rss ./modules/tag/backend.php [L,NC,QSA] + RewriteRule ^tags/feed-(.*?).rss ./modules/tag/backend.php?dirname=$1 + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&termid=$7 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)/([0-9]+)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&catid=$7&termid=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)-(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&termid=$7&dirname=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)/([0-9]+)-(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&catid=$4&termid=$7&dirname=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&term=$7 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)/(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&catid=$7&term=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/(.*?)-(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&term=$7&dirname=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)/(.*?)-(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&catid=$7&term=$8&dirname=$9 [L,NC,QSA] + +# Usage of the Tag Module in your XOOPS Module + +To enable tag for a module ("mymodule"), following steps are need: +* add tag input box to your item edit form (required) +* add tag storage to your item submission page (required) +* define functions to build info of tagged items (required) +* add tag display API to your item display page and include tag template in your item template (optional) +* add module tag view page and tag list page (optional) +* add module tag blocks (optional) + +## Step 1: add tag input box + +This is how you would set up an inclusion of the tag module in an itemised edit form in your module, this is not explicit example and could have variegates for the module you are writing or editing. + + // File: edit.item.php + $itemid = $item_obj->isNew() ? 0 : $item_obj->getVar("itemid"); + include_once XOOPS_ROOT_PATH . "/modules/tag/include/formtag.php"; + $form_item->addElement(new XoopsFormTag("item_tag", 60, 255, $itemid, $catid = 0)); + +## Step 2: add tag storage after item storage + +This is how you would set up an inclusion of the tag module in an itemised submition form in your module, this is not explicit example and could have variegates for the module you are writing or editing. + + // File: submit.item.php + $handler = xoops_getmodulehandler('tag', 'tag'); + $handler->updateByItem($_POST["item_tag"], $itemid, $xoopsModule->getVar("dirname"), $catid = 0); + +## Step 3: define functions to build info of tagged items of module + +This is the plugin for the tag module to enable the taging in both the tag module and the module you are writing/editing! +Editing File Example: /modules/tag/plugin/mymodule.php + +### Get item fields: title, content, time, link, uid, uname, tags + + function mymodule_tag_iteminfo(&$items) + { + $items_id = array(); + foreach (array_keys($items) as $cat_id) { + // Some handling here to build the link upon catid + // If catid is not used, just skip it + foreach (array_keys($items[$cat_id]) as $item_id) { + // In article, the item_id is "art_id" + $items_id[] = intval($item_id); + } + } + $item_handler =& xoops_getmodulehandler('item', 'mymodule'); + $items_obj = $item_handler->getObjects(new Criteria("id", "(" . implode(", ", $items_id) . ")", "IN"), true); + $myts =& MyTextSanitizer::getInstance(); + foreach (array_keys($items) as $cat_id) { + foreach (array_keys($items[$cat_id]) as $item_id) { + $item_obj =& $items_obj[$item_id]; + if (is_object($item_obj)) + $items[$cat_id][$item_id] = array( + "title" => $item_obj->getVar("subject"), + "uid" => $item_obj->getVar("uid"), + "link" => "index.php?id={$item_id}", + "url" => XOOPS_URL . "/modules/mymodule/index.php?id={$item_id}", + "time" => formatTimestamp($item_obj->getVar("date"), "s"), + "tags" => tag_parse_tag($item_obj->getVar("tags", "n")), + "category" => tag_parse_category($cat_id), + "content" => $myts->displayTarea($item_obj->getVar("page_description"),true,true,true,true,true,true) + ); + } + } + unset($items_obj); + return $items; + } + +### Remove orphan tag-item links + + function mymodule_tag_synchronization($mid) + { + // Optional + } + +### Get's category catid data for module (new function in plugin since 2.30) + +### Get item fields: catid, parentid, term + + function mymodule_tag_category($catid) + { + return array('catid'=>0, 'parentid' =>0, 'term' =>'Category Title'); + } + +### Get's if tag's module is enabled in module (new function in plugin since 2.30) + +### Return Boolean + + function mymodule_tag_supported() + { + return false; + } + +### Get's if tag's module (parent) version supported and module version (child) supported (new function in plugin since 2.30) + +### Return Array + + function mymodule_tag_version() + { + return array('parent' => 3.02, 'child' => 1.69); + } + +## Step 4: Display tags on our tiem page + +These files are not explicit as filenames they could be different this is how to display the tag in the item of the module you are editing/writing. + +### File: view.item.php + + include_once XOOPS_ROOT_PATH."/modules/tag/include/tagbar.php"; + $xoopsTpl->assign('tagbar', tagBar($itemid, $catid = 0)); + +### File: mymodule_item_template.html + + <{include file="db:bar.html"}> + +## Step 5: create tag list page and tag view page and for categories as well + +This is the files that belong in /modules/mymodule/xxxx.xxx.php for redirecting or displaying within your module the tag lists and views as well as categories + +### File: list.tag.php + + include "header.php"; + include XOOPS_ROOT_PATH . "/modules/tag/list.tag.php"; + +### File: view.tag.php + + include "header.php"; + include XOOPS_ROOT_PATH . "/modules/tag/view.tag.php"; + +### File: list.cat.php + + include "header.php"; + include XOOPS_ROOT_PATH . "/modules/tag/list.cat.php"; + +### File: view.cat.php + + include "header.php"; + include XOOPS_ROOT_PATH . "/modules/tag/view.cat.php"; + +## Step 6: create tag blocks + +This is where you create the blocks you will have to edit and create files for this within your module + +### File: xoops_version.php + + /* + * $options: + * $options[0] - number of tags to display + * $options[1] - time duration, in days, 0 for all the time + * $options[2] - max font size (px or %) + * $options[3] - min font size (px or %) + */ + $modversion["blocks"][] = array( + "file" => "mymodule_block_tag.php", + "name" => "Module Tag Cloud", + "description" => "Show tag cloud", + "show_func" => "mymodule_block_cloud_show", + "edit_func" => "mymodule_block_cloud_edit", + "options" => "100|0|150|80", + "template" => "mymodule_block_cloud.html", + ); + + /* + * $options: + * $options[0] - number of tags to display + * $options[1] - time duration, in days, 0 for all the time + * $options[2] - sort: a - alphabet; c - count; t - time + */ + $modversion["blocks"][] = array( + "file" => "mymodule_block_tag.php", + "name" => "Module Top Tags", + "description" => "Show top tags", + "show_func" => "mymodule_block_top_show", + "edit_func" => "mymodule_block_top_edit", + "options" => "50|30|c", + "template" => "mymodule_block_top.html", + ); + + /* + * $options: + */ + $modversion["blocks"][] = array( + "file" => "mymodule_block_cumulus.php", + "name" => "Module Top Tags", + "description" => "Show top tags", + "show_func" => "mymodule_block_cumulus_show", + "edit_func" => "mymodule_block_cumulus_edit", + "options" => "", + "template" => "mymodule_block_cumulus.html", + ); + +### File: mymodule_block_tag.php + +This file belongs in /modules/mymodule/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + function mymodule_block_cloud_show($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_cloud_show($options, basename(dirname(__DIR__))); + } + function mymodule_block_cloud_edit($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_cloud_edit($options); + } + function mymodule_block_top_show($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_top_show($options, basename(dirname(__DIR__)); + } + function mymodule_block_top_edit($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_top_edit($options); + } + +### File: mymodule_block_cumulus.php + +This file belongs in /modules/mymodule/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + function mymodule_block_cumulus_show($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_cumulus_show($options, basename(dirname(__DIR__))); + } + function mymodule_block_cumulus_edit($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_cumulus_edit($options); + } + +### File: mymodule_block_cloud.html + +This file belongs in /modules/mymodule/templates/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + <{include file="db:block_cloud.html"}> + +### File: mymodule_block_top.html + +This file belongs in /modules/mymodule/templates/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + <{include file="db:block_top.html"}> + +### File: mymodule_block_cumulus.html + +This file belongs in /modules/mymodule/templates/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + <{include file="db:block_cumulus.html"}> Added: XoopsModules/tag/releases/3.05/README.md =================================================================== --- XoopsModules/tag/releases/3.05/README.md (rev 0) +++ XoopsModules/tag/releases/3.05/README.md 2017-08-30 09:02:09 UTC (rev 13287) @@ -0,0 +1,276 @@ +# Tag Module for XOOPS 2.5 + +## Version 2.xx (Still in Development) + +### Author: Simon Roberts <simon@snails.email> + +This module provides a centralized toolkit including input, display, stats and substantial more comprehensive applications, so that each module does not need to develop its own tag handling scripts. + +Check http://en.wikipedia.org/wiki/Tags for more info about "tag" + +# Shortened Search Engine Friendly URLS (mod_rewrite) + +The following goes in the .htaccess if your running apache2 in the XOOPS_ROOT_PATH + + RewriteEngine On + RewriteRule ^tags/index.html ./modules/tag/index.php [L,NC,QSA] + RewriteRule ^tags/index-(.*?).html ./modules/tag/index.php?dirname=$1 [L,NC,QSA] + RewriteRule ^tags/feed.rss ./modules/tag/backend.php [L,NC,QSA] + RewriteRule ^tags/feed-(.*?).rss ./modules/tag/backend.php?dirname=$1 + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&termid=$7 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)/([0-9]+)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&catid=$7&termid=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)-(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&termid=$7&dirname=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)/([0-9]+)-(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&catid=$4&termid=$7&dirname=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&term=$7 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)/(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&catid=$7&term=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/(.*?)-(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&term=$7&dirname=$8 [L,NC,QSA] + RewriteRule ^tags/(view|list|feed)/(tag|cat)/([0-9]+)/(count|time|term)/(ASC|DESC)/(cloud|list)/([0-9]+)/(.*?)-(.*?)(.html|.rss) ./modules/tag/$1.$2.php?start=$3&sort=$4&order=$5&mode=$6&catid=$7&term=$8&dirname=$9 [L,NC,QSA] + +# Usage of the Tag Module in your XOOPS Module + +To enable tag for a module ("mymodule"), following steps are need: +* add tag input box to your item edit form (required) +* add tag storage to your item submission page (required) +* define functions to build info of tagged items (required) +* add tag display API to your item display page and include tag template in your item template (optional) +* add module tag view page and tag list page (optional) +* add module tag blocks (optional) + +## Step 1: add tag input box + +This is how you would set up an inclusion of the tag module in an itemised edit form in your module, this is not explicit example and could have variegates for the module you are writing or editing. + + // File: edit.item.php + $itemid = $item_obj->isNew() ? 0 : $item_obj->getVar("itemid"); + include_once XOOPS_ROOT_PATH . "/modules/tag/include/formtag.php"; + $form_item->addElement(new XoopsFormTag("item_tag", 60, 255, $itemid, $catid = 0)); + +## Step 2: add tag storage after item storage + +This is how you would set up an inclusion of the tag module in an itemised submition form in your module, this is not explicit example and could have variegates for the module you are writing or editing. + + // File: submit.item.php + $handler = xoops_getmodulehandler('tag', 'tag'); + $handler->updateByItem($_POST["item_tag"], $itemid, $xoopsModule->getVar("dirname"), $catid = 0); + +## Step 3: define functions to build info of tagged items of module + +This is the plugin for the tag module to enable the taging in both the tag module and the module you are writing/editing! +Editing File Example: /modules/tag/plugin/mymodule.php + +### Get item fields: title, content, time, link, uid, uname, tags + + function mymodule_tag_iteminfo(&$items) + { + $items_id = array(); + foreach (array_keys($items) as $cat_id) { + // Some handling here to build the link upon catid + // If catid is not used, just skip it + foreach (array_keys($items[$cat_id]) as $item_id) { + // In article, the item_id is "art_id" + $items_id[] = intval($item_id); + } + } + $item_handler =& xoops_getmodulehandler('item', 'mymodule'); + $items_obj = $item_handler->getObjects(new Criteria("id", "(" . implode(", ", $items_id) . ")", "IN"), true); + $myts =& MyTextSanitizer::getInstance(); + foreach (array_keys($items) as $cat_id) { + foreach (array_keys($items[$cat_id]) as $item_id) { + $item_obj =& $items_obj[$item_id]; + if (is_object($item_obj)) + $items[$cat_id][$item_id] = array( + "title" => $item_obj->getVar("subject"), + "uid" => $item_obj->getVar("uid"), + "link" => "index.php?id={$item_id}", + "url" => XOOPS_URL . "/modules/mymodule/index.php?id={$item_id}", + "time" => formatTimestamp($item_obj->getVar("date"), "s"), + "tags" => tag_parse_tag($item_obj->getVar("tags", "n")), + "category" => tag_parse_category($cat_id), + "content" => $myts->displayTarea($item_obj->getVar("page_description"),true,true,true,true,true,true) + ); + } + } + unset($items_obj); + return $items; + } + +### Remove orphan tag-item links + + function mymodule_tag_synchronization($mid) + { + // Optional + } + +### Get's category catid data for module (new function in plugin since 2.30) + +### Get item fields: catid, parentid, term + + function mymodule_tag_category($catid) + { + return array('catid'=>0, 'parentid' =>0, 'term' =>'Category Title'); + } + +### Get's if tag's module is enabled in module (new function in plugin since 2.30) + +### Return Boolean + + function mymodule_tag_supported() + { + return false; + } + +### Get's if tag's module (parent) version supported and module version (child) supported (new function in plugin since 2.30) + +### Return Array + + function mymodule_tag_version() + { + return array('parent' => 3.02, 'child' => 1.69); + } + +## Step 4: Display tags on our tiem page + +These files are not explicit as filenames they could be different this is how to display the tag in the item of the module you are editing/writing. + +### File: view.item.php + + include_once XOOPS_ROOT_PATH."/modules/tag/include/tagbar.php"; + $xoopsTpl->assign('tagbar', tagBar($itemid, $catid = 0)); + +### File: mymodule_item_template.html + + <{include file="db:bar.html"}> + +## Step 5: create tag list page and tag view page and for categories as well + +This is the files that belong in /modules/mymodule/xxxx.xxx.php for redirecting or displaying within your module the tag lists and views as well as categories + +### File: list.tag.php + + include "header.php"; + include XOOPS_ROOT_PATH . "/modules/tag/list.tag.php"; + +### File: view.tag.php + + include "header.php"; + include XOOPS_ROOT_PATH . "/modules/tag/view.tag.php"; + +### File: list.cat.php + + include "header.php"; + include XOOPS_ROOT_PATH . "/modules/tag/list.cat.php"; + +### File: view.cat.php + + include "header.php"; + include XOOPS_ROOT_PATH . "/modules/tag/view.cat.php"; + +## Step 6: create tag blocks + +This is where you create the blocks you will have to edit and create files for this within your module + +### File: xoops_version.php + + /* + * $options: + * $options[0] - number of tags to display + * $options[1] - time duration, in days, 0 for all the time + * $options[2] - max font size (px or %) + * $options[3] - min font size (px or %) + */ + $modversion["blocks"][] = array( + "file" => "mymodule_block_tag.php", + "name" => "Module Tag Cloud", + "description" => "Show tag cloud", + "show_func" => "mymodule_block_cloud_show", + "edit_func" => "mymodule_block_cloud_edit", + "options" => "100|0|150|80", + "template" => "mymodule_block_cloud.html", + ); + + /* + * $options: + * $options[0] - number of tags to display + * $options[1] - time duration, in days, 0 for all the time + * $options[2] - sort: a - alphabet; c - count; t - time + */ + $modversion["blocks"][] = array( + "file" => "mymodule_block_tag.php", + "name" => "Module Top Tags", + "description" => "Show top tags", + "show_func" => "mymodule_block_top_show", + "edit_func" => "mymodule_block_top_edit", + "options" => "50|30|c", + "template" => "mymodule_block_top.html", + ); + + /* + * $options: + */ + $modversion["blocks"][] = array( + "file" => "mymodule_block_cumulus.php", + "name" => "Module Top Tags", + "description" => "Show top tags", + "show_func" => "mymodule_block_cumulus_show", + "edit_func" => "mymodule_block_cumulus_edit", + "options" => "", + "template" => "mymodule_block_cumulus.html", + ); + +### File: mymodule_block_tag.php + +This file belongs in /modules/mymodule/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + function mymodule_block_cloud_show($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_cloud_show($options, basename(dirname(__DIR__))); + } + function mymodule_block_cloud_edit($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_cloud_edit($options); + } + function mymodule_block_top_show($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_top_show($options, basename(dirname(__DIR__)); + } + function mymodule_block_top_edit($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_top_edit($options); + } + +### File: mymodule_block_cumulus.php + +This file belongs in /modules/mymodule/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + function mymodule_block_cumulus_show($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_cumulus_show($options, basename(dirname(__DIR__))); + } + function mymodule_block_cumulus_edit($options) + { + include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php"; + return block_cumulus_edit($options); + } + +### File: mymodule_block_cloud.html + +This file belongs in /modules/mymodule/templates/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + <{include file="db:block_cloud.html"}> + +### File: mymodule_block_top.html + +This file belongs in /modules/mymodule/templates/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + <{include file="db:block_top.html"}> + +### File: mymodule_block_cumulus.html + +This file belongs in /modules/mymodule/templates/blocks and is adjustable in function names and filename in the xoops_version.php as seen in the example above. + + <{include file="db:block_cumulus.html"}> Added: XoopsModules/tag/releases/3.05/modules/tag/admin/admin.tag.php =================================================================== --- XoopsModules/tag/releases/3.05/modules/tag/admin/admin.tag.php (rev 0) +++ XoopsModules/tag/releases/3.05/modules/tag/admin/admin.tag.php 2017-08-30 09:02:09 UTC (rev 13287) @@ -0,0 +1,115 @@ +<?php +/** + * XOOPS tag management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @author Taiwen Jiang <ph...@us...> + * @subpackage tag + * @description XOOPS tag management module + * @version 2.4.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/tag + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/tag + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/tag + * @link http://internetfounder.wordpress.com + */ + +include_once __DIR__ . '/header.php'; +xoops_cp_header(); + +xoops_load("XoopsFormLoader"); +xoops_load('XoopsPageNav'); + +$indexAdmin = new ModuleAdmin(); + +echo $indexAdmin->addNavigation(basename(__FILE__)); +echo $indexAdmin->renderIndex(); + +$limit = 10; +$modid = intval( empty($_GET['modid']) ? @$_POST['modid'] : $_GET['modid'] ); +$start = intval( empty($_GET['start']) ? @$_POST['start'] : $_GET['start'] ); +$status = intval( empty($_GET['status']) ? @$_POST['status'] : $_GET['status'] ); + +$tag_handler =& xoops_getmodulehandler("tag", $xoopsModule->getVar("dirname")); + +if (!empty($_POST['tags'])) { + foreach ($_POST['tags'] as $tag => $tag_status) { + $tag_obj =& $tag_handler->get($tag); + if (!is_object($tag_obj) || !$tag_obj->getVar("tag_id")) continue; + if ($tag_status < 0) { + $tag_handler->delete($tag_obj); + } elseif ($tag_status != $tag_obj->getVar("tag_status")) { + $tag_obj->setVar("tag_status", $tag_status); + $tag_handler->insert($tag_obj); + } + } + redirect_header("admin.tag.php?modid={$modid}&start={$start}&status={$status}", 2); + exit(); +} + +$sql = " SELECT tag_modid, COUNT(DISTINCT tag_id) AS count_tag"; +$sql .= " FROM " . $xoopsDB->prefix("tag_link"); +$sql .= " GROUP BY tag_modid"; +$counts_module = array(); +$module_list = array(); +if ( ($result = $xoopsDB->query($sql)) == false) { + xoops_error($xoopsDB->error()); +} else { + while ($myrow = $xoopsDB->fetchArray($result)) { + $counts_module[$myrow["tag_modid"]] = $myrow["count_tag"]; + } + if (!empty($counts_module)) { + $module_handler =& xoops_gethandler("module"); + $module_list = $module_handler->getList(new Criteria("mid", "(" . implode(", ", array_keys($counts_module)) . ")", "IN")); + } +} + +$opform = new XoopsSimpleForm('', 'moduleform', xoops_getenv("PHP_SELF"), "get"); +$tray = new XoopsFormElementTray(''); +$mod_select = new XoopsFormSelect(_SELECT, 'modid', $modid); +$mod_select->addOption(0, _ALL); +foreach ($module_list as $module => $module_name) { + $mod_select->addOption($module, $module_name." (" . $counts_module[$module] . ")"); +} +$tray->addElement($mod_select); +$status_select = new XoopsFormRadio("", 'status', $status); +$status_select->addOption(-1, _ALL); +$status_select->addOption(0, TAG_AM_ACTIVE); +$status_select->addOption(1, TAG_AM_INACTIVE); +$tray->addElement($status_select); +$tray->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); +$opform->addElement($tray); +$GLOBALS['xoopsTpl']->assign("opform", $opform->render()); +$GLOBALS['xoopsTpl']->assign("formuri", $_SERVER["PHP_SELF"]); + +$criteria = new CriteriaCompo(); +$criteria->setSort("a"); +$criteria->setOrder("ASC"); +if ($status >= 0) { + $criteria->add( new Criteria("o.tag_status", $status) ); +} +if (!empty($modid)) { + $criteria->add( new Criteria("l.tag_modid", $modid) ); +} +$count_tag = $tag_handler->getCount($criteria); +$nav = new XoopsPageNav($count_tag, $limit, $start, "start", "modid={$modid}&status={$status}"); +$GLOBALS['xoopsTpl']->assign('pagenav', $nav->renderNav(4)); +$criteria->setStart($start); +$criteria->setLimit($limit); +$GLOBALS['xoopsTpl']->assign('tags', $tag_handler->getByLimit($criteria, false)); +$GLOBALS['xoopsTpl']->assign('modid', $modid); +$GLOBALS['xoopsTpl']->assign('start', $start); +$GLOBALS['xoopsTpl']->assign('status', $status); + +echo $GLOBALS['xoopsTpl']->display(dirname(__DIR__) . '/templates/admin/tag_admin.html'); + +include_once __DIR__ . '/footer.php'; +?> \ No newline at end of file Property changes on: XoopsModules/tag/releases/3.05/modules/tag/admin/admin.tag.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/tag/releases/3.05/modules/tag/admin/footer.php =================================================================== --- XoopsModules/tag/releases/3.05/modules/tag/admin/footer.php (rev 0) +++ XoopsModules/tag/releases/3.05/modules/tag/admin/footer.php 2017-08-30 09:02:09 UTC (rev 13287) @@ -0,0 +1,25 @@ +<?php +/** + * Font Converter for fonts2web.org.uk +* +* You may not change or alter any portion of this comment or credits +* of supporting developers from this source code or any supporting source code +* which is considered copyrighted (c) material of the original comment or credit authors. +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* +* @copyright The XOOPS Project http://fonts2web.org.uk +* @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) +* @author Simon Roberts (wishcraft) <wis...@us...> +* @subpackage convert +* @description Converts fonts to web distributional format in a zip pack stamped +* @version 1.0.1 +* @link http://fonts2web.org.uk +* @link http://fonts.labs.coop +* @link http://internetfounder.wordpress.com +*/ + +echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='http://au.syd.labs.coop' rel='external'>Chronolabs Cooperative</a>\n" . " </div>\n" . '</div>'; + +xoops_cp_footer(); Property changes on: XoopsModules/tag/releases/3.05/modules/tag/admin/footer.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/tag/releases/3.05/modules/tag/admin/header.php =================================================================== --- XoopsModules/tag/releases/3.05/modules/tag/admin/header.php (rev 0) +++ XoopsModules/tag/releases/3.05/modules/tag/admin/header.php 2017-08-30 09:02:09 UTC (rev 13287) @@ -0,0 +1,86 @@ +<?php +/** + * XOOPS tag management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @author Taiwen Jiang <ph...@us...> + * @subpackage tag + * @description XOOPS tag management module + * @version 2.4.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/tag + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/tag + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/tag + * @link http://internetfounder.wordpress.com + */ + +include dirname(__DIR__) . "/include/vars.php"; +include_once dirname(__DIR__) . "/include/functions.php"; +$path = dirname(dirname(dirname(__DIR__))); +include_once dirname(__DIR__) . '/header.php'; +include_once $path . '/include/cp_functions.php'; +require_once $path . '/include/cp_header.php'; + +global $xoopsModule; + +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); + +//if functions.php file exist +//require_once dirname(__DIR__) . '/include/functions.php'; + +// Load language files +xoops_loadLanguage('admin', $thisModuleDir); +xoops_loadLanguage('modinfo', $thisModuleDir); +xoops_loadLanguage('main', $thisModuleDir); + +$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); +$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +$myts = MyTextSanitizer::getInstance(); + +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once XOOPS_ROOT_PATH . '/class/template.php'; + $xoopsTpl = new XoopsTpl(); +} + +include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); + +xoops_loadLanguage('user'); +if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) { + include_once $GLOBALS['xoops']->path('/class/template.php'); + $GLOBALS['xoopsTpl'] = new XoopsTpl(); +} + + +global $tagModule, $tagConfigsList, $tagConfigs, $tagConfigsOptions; + +if (empty($tagModule)) +{ + if (is_a($tagModule = xoops_getHandler('module')->getByDirname(basename(__DIR__)), "XoopsModule")) + { + if (empty($tagConfigsList)) + { + $tagConfigsList = tag_load_config(); + } + if (empty($tagConfigs)) + { + $tagConfigs = xoops_getHandler('config')->getConfigs(new Criteria('conf_modid', $tagModule->getVar('mid'))); + } + if (empty($tagConfigsOptions) && !empty($tagConfigs)) + { + foreach($tagConfigs as $key => $config) + $tagConfigsOptions[$config->getVar('conf_name')] = $config->getConfOptions(); + } + } +} + +?> \ No newline at end of file Property changes on: XoopsModules/tag/releases/3.05/modules/tag/admin/header.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/tag/releases/3.05/modules/tag/admin/htaccess.tag.php =================================================================== --- XoopsModules/tag/releases/3.05/modules/tag/admin/htaccess.tag.php (rev 0) +++ XoopsModules/tag/releases/3.05/modules/tag/admin/htaccess.tag.php 2017-08-30 09:02:09 UTC (rev 13287) @@ -0,0 +1,45 @@ +<?php +/** + * XOOPS tag management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @author Taiwen Jiang <ph...@us...> + * @subpackage tag + * @description XOOPS tag management module + * @version 2.4.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/tag + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/tag + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/tag + * @link http://internetfounder.wordpress.com + */ + +global $tagModule, $tagConfigsList, $tagConfigs, $tagConfigsOptions; + +include_once __DIR__ . '/header.php'; +xoops_cp_header(); + +xoops_load("XoopsFormLoader"); + +$indexAdmin = new ModuleAdmin(); + +echo $indexAdmin->addNavigation(basename(__FILE__)); +echo $indexAdmin->renderIndex(); + +$htaccess = file_get_contents(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'htaccess.txt'); +$htaccess = str_replace("%base%", $tagConfigsList['base'], $htaccess); +$htaccess = str_replace("%html%", $tagConfigsList['html'], $htaccess); +$GLOBALS['xoopsTpl']->assign('htaccess', $htaccess); + +echo $GLOBALS['xoopsTpl']->display(dirname(__DIR__) . '/templates/admin/tag_htaccess.html'); + +include_once __DIR__ . '/footer.php'; +?> \ No newline at end of file Property changes on: XoopsModules/tag/releases/3.05/modules/tag/admin/htaccess.tag.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/tag/releases/3.05/modules/tag/admin/index.html =================================================================== --- XoopsModules/tag/releases/3.05/modules/tag/admin/index.html (rev 0) +++ XoopsModules/tag/releases/3.05/modules/tag/admin/index.html 2017-08-30 09:02:09 UTC (rev 13287) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsModules/tag/releases/3.05/modules/tag/admin/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/tag/releases/3.05/modules/tag/admin/index.php =================================================================== --- XoopsModules/tag/releases/3.05/modules/tag/admin/index.php (rev 0) +++ XoopsModules/tag/releases/3.05/modules/tag/admin/index.php 2017-08-30 09:02:09 UTC (rev 13287) @@ -0,0 +1,97 @@ +<?php +/** + * XOOPS tag management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @author Taiwen Jiang <ph...@us...> + * @subpackage tag + * @description XOOPS tag management module + * @version 2.4.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/tag + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/tag + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/tag + * @link http://internetfounder.wordpress.com + */ + +include_once __DIR__ . '/header.php'; +xoops_cp_header(); + +$indexAdmin = new ModuleAdmin(); + +echo $indexAdmin->addNavigation(basename(__FILE__)); +echo $indexAdmin->renderIndex(); + +include XOOPS_ROOT_PATH . "/modules/tag/include/vars.php"; +echo function_exists("loadModuleAdminMenu") ? loadModuleAdminMenu(0) : ""; + +$tag_handler =& xoops_getmodulehandler("tag", $xoopsModule->getVar("dirname")); +$count_tag = $tag_handler->getCount(); + +$count_item = 0; +$sql = " SELECT COUNT(DISTINCT tl_id) FROM " . $xoopsDB->prefix("tag_link"); +if ( ($result = $xoopsDB->query($sql)) == false) { + xoops_error($xoopsDB->error()); +} else { + list($count_item) = $xoopsDB->fetchRow($result); +} + +$sql = " SELECT tag_modid, SUM(tag_count) AS count_item, COUNT(DISTINCT tag_id) AS count_tag"; +$sql .= " FROM " . $xoopsDB->prefix("tag_stats"); +$sql .= " GROUP BY tag_modid"; +$counts_module = array(); +if( ($result = $xoopsDB->query($sql)) == false) { + xoops_error($xoopsDB->error()); +} else { + while ($myrow = $xoopsDB->fetchArray($result)) { + $counts_module[$myrow["tag_modid"]] = array("count_item" => $myrow["count_item"], "count_tag" => $myrow["count_tag"]); + } + if (!empty($counts_module)) { + $module_handler =& xoops_gethandler("module"); + $module_list = $module_handler->getList(new Criteria("mid", "(" . implode(", ", array_keys($counts_module)) . ")", "IN")); + } +} + +$output= " + <style type=\"text/css\"> + label,text { + display: block; + float: left; + margin-bottom: 2px; + } + label { + text-align: right; + width: 150px; + padding-right: 20px; + } + br { + clear: left; + } + </style> +"; + +$output .= "<fieldset><legend style='font-weight: bold; color: #900;'>" . TAG_AM_STATS . "</legend>"; +$output .= "<div style='padding: 8px;'>"; +$output .= "<label><strong>" . TAG_AM_COUNT_TAG . ":</strong></label><text>" . $count_tag . "</text><br />"; +$output .= "<label><strong>" . TAG_AM_COUNT_ITEM . ":</strong></label><text>" . $count_item . "</text><br />"; +$output .= "</div>"; +$output .= "<div style='padding: 8px;'>"; +$output .= "<label><strong>" . TAG_AM_COUNT_MODULE . "</strong>:</label><text>" . TAG_AM_COUNT_TAG . " - " . TAG_AM_COUNT_ITEM . "</text><br />"; +foreach ($counts_module as $module => $count) { + $output .= "<label>" . $module_list[$module] . ":</label><text>" . $count["count_tag"] . " - " . $count["count_item"] . " [<a href=\"" . XOOPS_URL . "/modules/tag/admin/admin.tag.php?modid={$module}\">" . TAG_AM_EDIT . "</a>] [<a href=\"" . XOOPS_URL . "/modules/tag/admin/syn.tag.php?modid={$module}\">" . TAG_AM_SYNCHRONIZATION . "</a>] </text><br />"; +} +$output .= "</div>"; +$output .= "</fieldset>"; + +echo $output; + +include_once __DIR__ . '/footer.php'; +?> \ No newline at end of file Property changes on: XoopsModules/tag/releases/3.05/modules/tag/admin/index.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/tag/releases/3.05/modules/tag/admin/menu.php =================================================================== --- XoopsModules/tag/releases/3.05/modules/tag/admin/menu.php (rev 0) +++ XoopsModules/tag/releases/3.05/modules/tag/admin/menu.php 2017-08-30 09:02:09 UTC (rev 13287) @@ -0,0 +1,52 @@ +<?php +/** + * XOOPS tag management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @aut... [truncated message content] |
From: <wis...@us...> - 2017-08-25 12:26:32
|
Revision: 13286 http://sourceforge.net/p/xoops/svn/13286 Author: wishcraft Date: 2017-08-25 12:26:29 +0000 (Fri, 25 Aug 2017) Log Message: ----------- , ['callback-url'] - added to ['submit']+ for inhouse replys stored in json on xoops_data! Modified Paths: -------------- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf =================================================================== (Binary files differ) |
From: <wis...@us...> - 2017-08-24 06:48:53
|
Revision: 13285 http://sourceforge.net/p/xoops/svn/13285 Author: wishcraft Date: 2017-08-24 06:48:51 +0000 (Thu, 24 Aug 2017) Log Message: ----------- releases.xoops.org - fixing profile registration! Modified Paths: -------------- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/assets/css/style.css *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/profile.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/releases-xoops-org.sql *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/themes/xbootstrap/style.css Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/assets/css/style.css =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/assets/css/style.css 2017-08-24 05:39:38 UTC (rev 13284) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/assets/css/style.css 2017-08-24 06:48:51 UTC (rev 13285) @@ -55,3 +55,45 @@ width: 90%; padding: 5px; } + + +#profile .caption-text +{ + font-size: 175% !important; +} + + +#profile .caption-marker +{ + font-size: 295% !important; +} + +#profile input, #profile select +{ + widht: 100% !important;; + font-size: 155% !important;; +} + +.profile-form .odd, .profile-form .even +{ + text-align: left !important; + padding: 4px; +} + +.profile-form radio +{ + margin-right: 8px; + margin-left: 5px; +} + +.profile-form checkbox +{ + margin-right: 4px; + margin-left: 3px; +} + +.profile-form label +{ + width: 29.75% !important; + margin: 2px 2px 1px 1px; +} Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/profile.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/profile.php 2017-08-24 05:39:38 UTC (rev 13284) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/profile.php 2017-08-24 06:48:51 UTC (rev 13285) @@ -268,7 +268,7 @@ $updatewritten= true; if ($obj->vars['account_type']['changed']==true) $updategroups = true; - if ($obj->vars['educational-facility']['changed']==true) + if ($obj->vars['educational_facility']['changed']==true) $updateedu = true; $uid = parent::insert($obj, $force); @@ -294,7 +294,7 @@ $sql = sprintf('DELETE FROM `%s` WHERE `groupid` IN (%s) AND `uid` = %u', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUPS_EDUCATION, $uid); $GLOBALS['xoopsDB']->queryF($sql); $sql = ''; - foreach($obj->vars['educational-facility']['value'] as $edutype) + foreach($obj->vars['educational_facility']['value'] as $edutype) { switch($edutype) Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/releases-xoops-org.sql =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/releases-xoops-org.sql 2017-08-24 05:39:38 UTC (rev 13284) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/releases-xoops-org.sql 2017-08-24 06:48:51 UTC (rev 13285) @@ -100,7 +100,7 @@ LOCK TABLES `poli__banner` WRITE; /*!40000 ALTER TABLE `poli__banner` DISABLE KEYS */; -INSERT INTO `poli__banner` VALUES (1,1,0,64,0,'http://releases.xoops.org.localhost/images/banners/xoops_flashbanner2.htm','http://www.xoops.org/',1008813250,1,''),(2,1,0,71,0,'http://releases.xoops.org.localhost/images/banners/xoops_banner_2.gif','http://www.xoops.org/',1008813250,0,''),(3,1,0,72,0,'http://releases.xoops.org.localhost/images/banners/banner.htm','http://www.xoops.org/',1008813250,1,''); +INSERT INTO `poli__banner` VALUES (1,1,0,67,0,'http://releases.xoops.org.localhost/images/banners/xoops_flashbanner2.htm','http://www.xoops.org/',1008813250,1,''),(2,1,0,72,0,'http://releases.xoops.org.localhost/images/banners/xoops_banner_2.gif','http://www.xoops.org/',1008813250,0,''),(3,1,0,73,0,'http://releases.xoops.org.localhost/images/banners/banner.htm','http://www.xoops.org/',1008813250,1,''); /*!40000 ALTER TABLE `poli__banner` ENABLE KEYS */; UNLOCK TABLES; @@ -557,7 +557,7 @@ `flag` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`lang_id`), KEY `SEARCH` (`name`(10),`code`(3),`folder`(20)) -) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -566,7 +566,7 @@ LOCK TABLES `poli__languages_languages` WRITE; /*!40000 ALTER TABLE `poli__languages_languages` DISABLE KEYS */; -INSERT INTO `poli__languages_languages` VALUES (1,'Albanian','sq','',''),(2,'Arabic','ar','',''),(3,'Bulgarian','bg','',''),(4,'Catalan','ca','',''),(5,'Chinese (Simplified)','zh-CN','schinese,schinese_utf8',''),(6,'Chinese (Traditional)','zh-TW','tchinese,tchinese_utf8',''),(9,'Croatian','hr','',''),(10,'Czech','cs','',''),(11,'Danish','da','',''),(12,'Dutch','nl','',''),(13,'English','en','',''),(14,'Estonian','et','',''),(15,'Filipino','tl','',''),(16,'Finnish','fi','',''),(17,'French','fr','',''),(18,'Galician','gl','',''),(19,'German','de','',''),(20,'Greek','el','',''),(21,'Hebrew','iw','',''),(22,'Hindi','hi','',''),(23,'Hungarian','hu','',''),(24,'Indonesian','id','',''),(25,'Italian','it','',''),(26,'Japanese','ja','',''),(27,'Korean','ko','',''),(28,'Latvian','lv','',''),(29,'Lithuanian','lt','',''),(30,'Maltese','mt','',''),(31,'Norwegian','no','',''),(32,'Polish','pl','',''),(33,'Portuguese','pt','',''),(34,'Romanian','ro','',''),(35,'Russian','ru','',''),(36,'Serbian','sr','',''),(37,'Slovak','sk','',''),(38,'Slovenian','sl','',''),(39,'Spanish','es','',''),(40,'Swedish','sv','',''),(41,'Thai','th','',''),(42,'Turkish','tr','',''),(43,'Ukrainian','uk','',''),(44,'Vietnamese','vi','',''); +INSERT INTO `poli__languages_languages` VALUES (1,'Albanian','sq','',''),(2,'Arabic','ar','',''),(3,'Bulgarian','bg','',''),(4,'Catalan','ca','',''),(5,'Chinese (Simplified)','zh-CN','schinese,schinese_utf8',''),(6,'Chinese (Traditional)','zh-TW','tchinese,tchinese_utf8',''),(9,'Croatian','hr','',''),(10,'Czech','cs','',''),(11,'Danish','da','',''),(12,'Dutch','nl','',''),(13,'English','en','',''),(14,'Estonian','et','',''),(15,'Filipino','tl','',''),(16,'Finnish','fi','',''),(17,'French','fr','',''),(18,'Galician','gl','',''),(19,'German','de','',''),(20,'Greek','el','',''),(21,'Hebrew','iw','',''),(22,'Hindi','hi','',''),(23,'Hungarian','hu','',''),(24,'Indonesian','id','',''),(25,'Italian','it','',''),(26,'Japanese','ja','',''),(27,'Korean','ko','',''),(28,'Latvian','lv','',''),(29,'Lithuanian','lt','',''),(30,'Maltese','mt','',''),(31,'Norwegian','no','',''),(32,'Polish','pl','',''),(33,'Portuguese','pt','',''),(34,'Romanian','ro','',''),(35,'Russian','ru','',''),(36,'Serbian','sr','',''),(37,'Slovak','sk','',''),(38,'Slovenian','sl','',''),(39,'Spanish','es','',''),(40,'Swedish','sv','',''),(41,'Thai','th','',''),(42,'Turkish','tr','',''),(43,'Ukrainian','uk','',''),(44,'Vietnamese','vi','',''),(45,'Klingon','kl','klingon',''),(46,'H4x0r','hx','h4x0r',''); /*!40000 ALTER TABLE `poli__languages_languages` ENABLE KEYS */; UNLOCK TABLES; @@ -1024,7 +1024,7 @@ LOCK TABLES `poli__profile_field` WRITE; /*!40000 ALTER TABLE `poli__profile_field` DISABLE KEYS */; -INSERT INTO `poli__profile_field` VALUES (1,1,'textbox',1,'name','Real Name','',0,255,1,NULL,0,1,1,0,'a:0:{}',2),(2,1,'textbox',1,'user_from','Location','',0,255,2,NULL,0,1,1,0,'a:0:{}',2),(3,1,'timezone',1,'timezone_offset','Time Zone','',0,0,3,NULL,0,1,1,0,'a:0:{}',2),(4,1,'textbox',1,'user_occ','Occupation','',0,255,4,NULL,0,1,1,0,'a:0:{}',2),(5,1,'textbox',1,'user_intrest','Interest','',0,255,5,NULL,0,1,1,0,'a:0:{}',2),(6,1,'textarea',2,'bio','Extra Info','',0,0,6,NULL,0,1,1,0,'a:0:{}',2),(7,1,'datetime',3,'user_regdate','Member Since','',0,10,7,NULL,0,0,1,0,'a:0:{}',0),(8,2,'textbox',1,'user_icq','ICQ','',0,255,1,NULL,0,1,1,0,'a:0:{}',2),(9,2,'textbox',1,'user_aim','AIM','',0,255,2,NULL,0,1,1,0,'a:0:{}',2),(10,2,'textbox',1,'user_yim','YIM','',0,255,3,NULL,0,1,1,0,'a:0:{}',2),(11,2,'textbox',1,'user_msnm','MSNM','',0,255,4,NULL,0,1,1,0,'a:0:{}',2),(12,3,'yesno',3,'user_viewemail','Allow other users to view my email address','',0,1,1,NULL,0,1,1,0,'a:0:{}',2),(13,3,'yesno',3,'attachsig','Always attach my signature','',0,1,2,NULL,0,1,1,0,'a:0:{}',0),(14,3,'yesno',3,'user_mailok','Receive occasional email notices from administrators and moderators?','',0,1,3,NULL,0,1,1,0,'a:0:{}',2),(15,3,'theme',1,'theme','Theme','',0,0,4,NULL,0,1,1,0,'a:0:{}',0),(16,3,'select',1,'umode','Comments Display Mode','',0,0,5,NULL,0,1,1,0,'a:3:{s:4:\"nest\";s:8:\"TmVzdGVk\";s:4:\"flat\";s:8:\"RmxhdA==\";s:6:\"thread\";s:12:\"VGhyZWFkZWQ=\";}',0),(17,3,'select',3,'uorder','Comments Sort Order','',0,0,6,NULL,0,1,1,0,'a:2:{i:0;s:16:\"T2xkZXN0IEZpcnN0\";i:1;s:16:\"TmV3ZXN0IEZpcnN0\";}',0),(18,3,'select',3,'notify_mode','Default Notification Mode','',0,0,7,NULL,0,1,1,0,'a:3:{i:0;s:44:\"Tm90aWZ5IG1lIG9mIGFsbCBzZWxlY3RlZCB1cGRhdGVz\";i:1;s:28:\"Tm90aWZ5IG1lIG9ubHkgb25jZQ==\";i:2;s:64:\"Tm90aWZ5IG1lIG9uY2UgdGhlbiBkaXNhYmxlIHVudGlsIEkgbG9nIGluIGFnYWlu\";}',0),(19,3,'select',3,'notify_method','Notification Method When you monitor e.g. a forum, how would you like to receive notifications of updates?','',0,0,8,NULL,0,1,1,0,'a:3:{i:0;s:28:\"VGVtcG9yYXJpbHkgRGlzYWJsZQ==\";i:1;s:20:\"UHJpdmF0ZSBNZXNzYWdl\";i:2;s:44:\"RW1haWwgKHVzZSBhZGRyZXNzIGluIG15IHByb2ZpbGUp\";}',0),(20,4,'textbox',1,'url','Website','',0,255,1,NULL,0,1,1,0,'a:0:{}',2),(21,4,'textbox',3,'posts','Comments/Posts','',0,0,2,NULL,0,0,1,0,'a:0:{}',0),(22,4,'rank',3,'rank','Rank','',0,0,3,NULL,0,1,1,0,'a:0:{}',0),(23,4,'datetime',3,'last_login','Last Login','',0,10,4,NULL,0,0,1,0,'a:0:{}',0),(24,4,'textarea',2,'user_sig','Signature','',0,0,5,NULL,0,1,1,0,'a:0:{}',0),(25,6,'textbox',1,'author_name','Author Name','This is your publishing authors name',0,255,100,NULL,0,1,1,1,'a:0:{}',0),(26,6,'textbox',1,'author_email','Author eMail','This is your reported author email address',0,255,101,NULL,0,1,1,1,'a:0:{}',0),(27,6,'textbox',1,'author_skype','Author Skype','This is your contact for skype on authoring on this service',0,255,102,NULL,0,1,1,1,'a:0:{}',0),(28,6,'timezone',1,'author_timezone','Author Timezone','This is your authoring timezone',0,255,103,NULL,0,1,1,1,'a:0:{}',0),(29,6,'textbox',1,'author_location','Author Location','This is your reported Authors\' Location',0,255,104,NULL,0,1,1,1,'a:0:{}',0),(30,6,'textbox',1,'author_aliases','Author Aliases','This is your reported author aliases, username, nickname (Seperated by a comma+space)',0,255,105,NULL,0,1,1,1,'a:0:{}',0),(31,6,'textbox',1,'author_blog_url','Author Blog URL','This is the full url for your author blog',0,255,106,NULL,0,1,1,1,'a:0:{}',0),(32,6,'textbox',1,'author_twitter_url','Author Twitter URL','This is the full URL to your twitter profile for authoring details',0,255,107,'https://twitter.com/',0,1,1,1,'a:0:{}',0),(33,6,'textbox',1,'author_facebook_url','Author Facebook URL','This is your full url for your facebook profile with authoring (not group/bizo ~ personal)',0,255,108,'https://facebook.com/',0,1,1,1,'a:0:{}',0),(34,6,'textbox',1,'author_googleplus_url','Author Google+ URL','This is the URL for your personal authoring Google+ Profile',0,255,109,'https://plus.google.com/',0,1,1,1,'a:0:{}',0),(35,6,'textbox',1,'author_group_url','Author Group URL','This is the URL for your business, company, organisation, the group you do releases with URL here',0,255,110,'',0,1,1,1,'a:0:{}',0),(36,6,'textbox',1,'author_xoops_url','Author XOOPS URL','This is your XOOPS.org User Profile URL',0,255,111,'https://xoops.org/modules/profile/userinfo.php?uid=',0,1,1,1,'a:0:{}',0),(37,6,'textbox',1,'author_sourceforge_url','Author Sourceforge.net URL','This is the URL for your sourceforge.net profile (Your User Profile)',0,255,112,'https://sourceforge.net',0,1,1,1,'a:0:{}',0),(38,6,'textbox',1,'author_guthub_url','Author GitHub URL','This is where you put the full URL for your github.com / github.io profile page!',0,255,113,'https://github.com',0,1,1,1,'a:0:{}',0),(39,6,'textbox',1,'author_photo_url','Author Photo URL','This is a URL to periodically check for an image at least high resolution of approx. 1024 x 1024+',0,255,98,'',0,1,1,1,'a:0:{}',0),(40,6,'textbox',1,'author_avatar_url','Author Avatar URL','This is your author avatar URL to periodically import max size 512 x 512 <',0,255,99,'',0,1,1,1,'a:0:{}',0),(60,3,'checkbox',6,'account_type','Account Types','This is the type of releases you will be using on this system',1,0,100,'a:2:{i:0;s:6:\"module\";i:1;s:5:\"theme\";}',0,1,1,1,'a:6:{s:4:\"core\";s:20:\"Q29yZSBEZXZlbG9wZXI=\";s:6:\"module\";s:24:\"TW9kdWxlIERldmVsb3Blcg==\";s:5:\"theme\";s:20:\"VGhlbWUgRGV2ZWxvcGVy\";s:8:\"language\";s:24:\"VHJhbnNsYXRvciBNZW1iZXI=\";s:8:\"document\";s:28:\"RG9jdW1lbnRhdGlvbiBNZW1iZXI=\";s:7:\"testing\";s:20:\"VGVzdGluZyBNZW1iZXI=\";}',1),(42,1,'languages',6,'spoken_languages','Spoken Languages','Your spoken languages',1,0,1111,NULL,0,1,1,1,'a:0:{}',1),(43,1,'languages',6,'written_languages','Written Languages','Your scribing languages that you can write/type',1,0,1831,NULL,0,1,1,1,'a:0:{}',1),(44,5,'textbox',1,'group_icon_url','Group Icon URL','This is the URL for the release groups icon (Maximum Size = 512x512)',0,255,100,'',0,1,1,1,'a:0:{}',0),(45,5,'textbox',1,'group_logo_url','Group Logo URL','This is the release group/business/organisation Logo URL (Maximum Size = 2048 x 2048)',0,255,101,'',0,1,1,1,'a:0:{}',0),(46,5,'textbox',1,'group_name','Group Name','This is the name of the group, business, organisation you do releases under',0,255,102,'',0,1,1,1,'a:0:{}',0),(47,5,'textbox',1,'group_email','Group Email Address','This is the group/business/organisation email address you have for contact',0,255,104,'',0,1,1,1,'a:0:{}',0),(48,5,'timezone',1,'group_timezone','Group Timezone','This is you\'re releases group timezone',0,255,105,'0',0,1,1,1,'a:0:{}',0),(49,5,'textbox',1,'group_location','Group Location','This is the general location of the group for releases',0,255,106,'',0,1,1,1,'a:0:{}',0),(50,5,'textbox',1,'group_registration_url','Group Registration URL','This is the URL for any dossier on the registration of the group ie. RBN listing',0,255,107,'',0,1,1,1,'a:0:{}',0),(51,5,'textbox',1,'group_blog_url','Group Blog URL','This the the URL for the releases group blog',0,255,108,'',0,1,1,1,'a:0:{}',0),(52,5,'textbox',1,'group_twitter_url','Group Twitter Profile URL','This is the URL for your group Twitter Profile URL',0,255,109,'https://twitter.com/',0,1,1,1,'a:0:{}',0),(53,5,'textbox',1,'group_facebook_url','Group Facebook Profile URL','This is the facebook URL path for your page for your releases group',0,255,110,'https://facebook.com/',0,1,1,1,'a:0:{}',0),(54,5,'textbox',1,'group_googleplus_url','Group Google+ Profile URL','This is the URL for your Google+ Releases Group Profile Page',0,255,111,'',0,1,1,1,'a:0:{}',0),(55,5,'textbox',1,'group_profile_url','Group Profile URL','This the URL for your Releases Groups Website/Profile Page',0,255,112,'',0,1,1,1,'a:0:{}',0),(56,5,'textbox',1,'group_sourceforge_url','Group Sourceforge.net Profile/Project URL','This is the URL for your sourceforge.net project or profile page',0,255,113,'https://sourceforge.net/project/',0,1,1,1,'a:0:{}',0),(57,5,'textbox',1,'group_github_url','Group GitHub Profile URL','This is the URL for your GitHub Releases Group URL',0,255,114,'https://github.com/',0,1,1,1,'a:0:{}',0),(58,5,'textbox',1,'group_tickets_url','Group Bug Reporting URL','This is the URL for your releases bug tickets/reporting',0,255,115,'',0,1,1,1,'a:0:{}',0),(59,5,'textbox',1,'group_wiki_url','Group Wiki/Help References URL','This is your releases group wiki/help references URL',0,255,116,'',0,1,1,1,'a:0:{}',0),(61,3,'textbox',1,'callback_api_url','Callback API URL','This is the URL for your own API to be used for callback passes on events on this portal relating to you',0,255,99,'http://',0,1,1,1,'a:0:{}',0),(62,3,'textbox',1,'invite_email','invite eMail','This is the email address the individual was invited to this portal on',0,255,1111,'',0,1,1,1,'a:0:{}',0),(63,3,'checkbox',6,'educational-facility','Educational Facility','If this account is being used at an educational facility please select the types you are from the list!',0,0,1112,'a:1:{i:0;s:0:\"\";}',0,1,1,1,'a:6:{s:7:\"primary\";s:20:\"UHJpbWFyeSBTY2hvb2w=\";s:9:\"secondary\";s:16:\"SGlnaCBTY2hvb2w=\";s:8:\"tertiary\";s:24:\"VGVyaXRhcnkgRWR1Y2F0aW9u\";s:14:\"youth-vocation\";s:24:\"WW91dGggVm9jYXRpb25hbA==\";s:14:\"adult-vocation\";s:24:\"QWR1bHQgVm9jYXRpb25hbA==\";s:9:\"religious\";s:24:\"RmFpdGgncyBGYWNpbGl0eQ==\";}',1); +INSERT INTO `poli__profile_field` VALUES (1,1,'textbox',1,'name','Real Name','',0,255,1,NULL,0,1,1,0,'a:0:{}',2),(2,1,'textbox',1,'user_from','Location','',0,255,2,NULL,0,1,1,0,'a:0:{}',2),(3,1,'timezone',1,'timezone_offset','Time Zone','',0,0,3,NULL,0,1,1,0,'a:0:{}',2),(4,1,'textbox',1,'user_occ','Occupation','',0,255,4,NULL,0,1,1,0,'a:0:{}',2),(5,1,'textbox',1,'user_intrest','Interest','',0,255,5,NULL,0,1,1,0,'a:0:{}',2),(6,1,'textarea',2,'bio','Extra Info','',0,0,6,NULL,0,1,1,0,'a:0:{}',2),(7,1,'datetime',3,'user_regdate','Member Since','',0,10,7,NULL,0,0,1,0,'a:0:{}',0),(8,2,'textbox',1,'user_icq','ICQ','',0,255,1,NULL,0,1,1,0,'a:0:{}',2),(9,2,'textbox',1,'user_aim','AIM','',0,255,2,NULL,0,1,1,0,'a:0:{}',2),(10,2,'textbox',1,'user_yim','YIM','',0,255,3,NULL,0,1,1,0,'a:0:{}',2),(11,2,'textbox',1,'user_msnm','MSNM','',0,255,4,NULL,0,1,1,0,'a:0:{}',2),(12,3,'yesno',3,'user_viewemail','Allow other users to view my email address','',0,1,1,NULL,0,1,1,0,'a:0:{}',2),(13,3,'yesno',3,'attachsig','Always attach my signature','',0,1,2,NULL,0,1,1,0,'a:0:{}',0),(14,3,'yesno',3,'user_mailok','Receive occasional email notices from administrators and moderators?','',0,1,3,NULL,0,1,1,0,'a:0:{}',2),(15,3,'theme',1,'theme','Theme','',0,0,4,NULL,0,1,1,0,'a:0:{}',0),(16,3,'select',1,'umode','Comments Display Mode','',0,0,5,NULL,0,1,1,0,'a:3:{s:4:\"nest\";s:8:\"TmVzdGVk\";s:4:\"flat\";s:8:\"RmxhdA==\";s:6:\"thread\";s:12:\"VGhyZWFkZWQ=\";}',0),(17,3,'select',3,'uorder','Comments Sort Order','',0,0,6,NULL,0,1,1,0,'a:2:{i:0;s:16:\"T2xkZXN0IEZpcnN0\";i:1;s:16:\"TmV3ZXN0IEZpcnN0\";}',0),(18,3,'select',3,'notify_mode','Default Notification Mode','',0,0,7,NULL,0,1,1,0,'a:3:{i:0;s:44:\"Tm90aWZ5IG1lIG9mIGFsbCBzZWxlY3RlZCB1cGRhdGVz\";i:1;s:28:\"Tm90aWZ5IG1lIG9ubHkgb25jZQ==\";i:2;s:64:\"Tm90aWZ5IG1lIG9uY2UgdGhlbiBkaXNhYmxlIHVudGlsIEkgbG9nIGluIGFnYWlu\";}',0),(19,3,'select',3,'notify_method','Notification Method When you monitor e.g. a forum, how would you like to receive notifications of updates?','',0,0,8,NULL,0,1,1,0,'a:3:{i:0;s:28:\"VGVtcG9yYXJpbHkgRGlzYWJsZQ==\";i:1;s:20:\"UHJpdmF0ZSBNZXNzYWdl\";i:2;s:44:\"RW1haWwgKHVzZSBhZGRyZXNzIGluIG15IHByb2ZpbGUp\";}',0),(20,4,'textbox',1,'url','Website','',0,255,1,NULL,0,1,1,0,'a:0:{}',2),(21,4,'textbox',3,'posts','Comments/Posts','',0,0,2,NULL,0,0,1,0,'a:0:{}',0),(22,4,'rank',3,'rank','Rank','',0,0,3,NULL,0,1,1,0,'a:0:{}',0),(23,4,'datetime',3,'last_login','Last Login','',0,10,4,NULL,0,0,1,0,'a:0:{}',0),(24,4,'textarea',2,'user_sig','Signature','',0,0,5,NULL,0,1,1,0,'a:0:{}',0),(25,6,'textbox',1,'author_name','Author Name','This is your publishing authors name',0,255,100,NULL,0,1,1,1,'a:0:{}',0),(26,6,'textbox',1,'author_email','Author eMail','This is your reported author email address',0,255,101,NULL,0,1,1,1,'a:0:{}',0),(27,6,'textbox',1,'author_skype','Author Skype','This is your contact for skype on authoring on this service',0,255,102,NULL,0,1,1,1,'a:0:{}',0),(28,6,'timezone',1,'author_timezone','Author Timezone','This is your authoring timezone',0,255,103,NULL,0,1,1,1,'a:0:{}',0),(29,6,'textbox',1,'author_location','Author Location','This is your reported Authors\' Location',0,255,104,NULL,0,1,1,1,'a:0:{}',0),(30,6,'textbox',1,'author_aliases','Author Aliases','This is your reported author aliases, username, nickname (Seperated by a comma+space)',0,255,105,NULL,0,1,1,1,'a:0:{}',0),(31,6,'textbox',1,'author_blog_url','Author Blog URL','This is the full url for your author blog',0,255,106,NULL,0,1,1,1,'a:0:{}',0),(32,6,'textbox',1,'author_twitter_url','Author Twitter URL','This is the full URL to your twitter profile for authoring details',0,255,107,'https://twitter.com/',0,1,1,1,'a:0:{}',0),(33,6,'textbox',1,'author_facebook_url','Author Facebook URL','This is your full url for your facebook profile with authoring (not group/bizo ~ personal)',0,255,108,'https://facebook.com/',0,1,1,1,'a:0:{}',0),(34,6,'textbox',1,'author_googleplus_url','Author Google+ URL','This is the URL for your personal authoring Google+ Profile',0,255,109,'https://plus.google.com/',0,1,1,1,'a:0:{}',0),(35,6,'textbox',1,'author_group_url','Author Group URL','This is the URL for your business, company, organisation, the group you do releases with URL here',0,255,110,'',0,1,1,1,'a:0:{}',0),(36,6,'textbox',1,'author_xoops_url','Author XOOPS URL','This is your XOOPS.org User Profile URL',0,255,111,'https://xoops.org/modules/profile/userinfo.php?uid=',0,1,1,1,'a:0:{}',0),(37,6,'textbox',1,'author_sourceforge_url','Author Sourceforge.net URL','This is the URL for your sourceforge.net profile (Your User Profile)',0,255,112,'https://sourceforge.net',0,1,1,1,'a:0:{}',0),(38,6,'textbox',1,'author_guthub_url','Author GitHub URL','This is where you put the full URL for your github.com / github.io profile page!',0,255,113,'https://github.com',0,1,1,1,'a:0:{}',0),(39,6,'textbox',1,'author_photo_url','Author Photo URL','This is a URL to periodically check for an image at least high resolution of approx. 1024 x 1024+',0,255,98,'',0,1,1,1,'a:0:{}',0),(40,6,'textbox',1,'author_avatar_url','Author Avatar URL','This is your author avatar URL to periodically import max size 512 x 512 <',0,255,99,'',0,1,1,1,'a:0:{}',0),(60,3,'checkbox',6,'account_type','Account Types','This is the type of releases you will be using on this system',1,0,100,'a:2:{i:0;s:6:\"module\";i:1;s:5:\"theme\";}',0,1,1,1,'a:6:{s:4:\"core\";s:20:\"Q29yZSBEZXZlbG9wZXI=\";s:6:\"module\";s:24:\"TW9kdWxlIERldmVsb3Blcg==\";s:5:\"theme\";s:20:\"VGhlbWUgRGV2ZWxvcGVy\";s:7:\"testing\";s:20:\"VGVzdGluZyBNZW1iZXI=\";s:8:\"document\";s:20:\"RG9jdW1lbnRhdGlvbg==\";s:8:\"language\";s:24:\"Q29weSBUcmFuc2xhdGVycw==\";}',1),(42,1,'languages',6,'spoken_languages','Spoken Languages','Your spoken languages',1,0,1111,NULL,0,1,1,1,'a:0:{}',1),(43,1,'languages',6,'written_languages','Written Languages','Your scribing languages that you can write/type',1,0,1831,NULL,0,1,1,1,'a:0:{}',1),(44,5,'textbox',1,'group_icon_url','Group Icon URL','This is the URL for the release groups icon (Maximum Size = 512x512)',0,255,100,'',0,1,1,1,'a:0:{}',0),(45,5,'textbox',1,'group_logo_url','Group Logo URL','This is the release group/business/organisation Logo URL (Maximum Size = 2048 x 2048)',0,255,101,'',0,1,1,1,'a:0:{}',0),(46,5,'textbox',1,'group_name','Group Name','This is the name of the group, business, organisation you do releases under',0,255,102,'',0,1,1,1,'a:0:{}',0),(47,5,'textbox',1,'group_email','Group Email Address','This is the group/business/organisation email address you have for contact',0,255,104,'',0,1,1,1,'a:0:{}',0),(48,5,'timezone',1,'group_timezone','Group Timezone','This is you\'re releases group timezone',0,255,105,'0',0,1,1,1,'a:0:{}',0),(49,5,'textbox',1,'group_location','Group Location','This is the general location of the group for releases',0,255,106,'',0,1,1,1,'a:0:{}',0),(50,5,'textbox',1,'group_registration_url','Group Registration URL','This is the URL for any dossier on the registration of the group ie. RBN listing',0,255,107,'',0,1,1,1,'a:0:{}',0),(51,5,'textbox',1,'group_blog_url','Group Blog URL','This the the URL for the releases group blog',0,255,108,'',0,1,1,1,'a:0:{}',0),(52,5,'textbox',1,'group_twitter_url','Group Twitter Profile URL','This is the URL for your group Twitter Profile URL',0,255,109,'https://twitter.com/',0,1,1,1,'a:0:{}',0),(53,5,'textbox',1,'group_facebook_url','Group Facebook Profile URL','This is the facebook URL path for your page for your releases group',0,255,110,'https://facebook.com/',0,1,1,1,'a:0:{}',0),(54,5,'textbox',1,'group_googleplus_url','Group Google+ Profile URL','This is the URL for your Google+ Releases Group Profile Page',0,255,111,'',0,1,1,1,'a:0:{}',0),(55,5,'textbox',1,'group_profile_url','Group Profile URL','This the URL for your Releases Groups Website/Profile Page',0,255,112,'',0,1,1,1,'a:0:{}',0),(56,5,'textbox',1,'group_sourceforge_url','Group Sourceforge.net Profile/Project URL','This is the URL for your sourceforge.net project or profile page',0,255,113,'https://sourceforge.net/project/',0,1,1,1,'a:0:{}',0),(57,5,'textbox',1,'group_github_url','Group GitHub Profile URL','This is the URL for your GitHub Releases Group URL',0,255,114,'https://github.com/',0,1,1,1,'a:0:{}',0),(58,5,'textbox',1,'group_tickets_url','Group Bug Reporting URL','This is the URL for your releases bug tickets/reporting',0,255,115,'',0,1,1,1,'a:0:{}',0),(59,5,'textbox',1,'group_wiki_url','Group Wiki/Help References URL','This is your releases group wiki/help references URL',0,255,116,'',0,1,1,1,'a:0:{}',0),(61,3,'textbox',1,'callback_api_url','Callback API URL','This is the URL for your own API to be used for callback passes on events on this portal relating to you',0,255,99,'http://',0,1,1,1,'a:0:{}',0),(62,3,'textbox',1,'invite_email','invite eMail','This is the email address the individual was invited to this portal on',0,255,1111,'',0,1,1,1,'a:0:{}',0),(63,3,'checkbox',6,'educational_facility','Educational Facility','If this account is being used at an educational facility please select the types you are from the list!',0,0,1112,'a:1:{i:0;s:0:\"\";}',0,1,1,1,'a:6:{s:7:\"primary\";s:20:\"UHJpbWFyeSBTY2hvb2w=\";s:9:\"secondary\";s:16:\"SGlnaCBTY2hvb2w=\";s:8:\"tertiary\";s:24:\"VGVyaXRhcnkgRWR1Y2F0aW9u\";s:14:\"youth-vocation\";s:24:\"WW91dGggVm9jYXRpb25hbA==\";s:14:\"adult-vocation\";s:24:\"QWR1bHQgVm9jYXRpb25hbA==\";s:9:\"religious\";s:24:\"RmFpdGgncyBGYWNpbGl0eQ==\";}',1); /*!40000 ALTER TABLE `poli__profile_field` ENABLE KEYS */; UNLOCK TABLES; @@ -1074,7 +1074,7 @@ `account_type` mediumtext, `callback_api_url` varchar(255) DEFAULT NULL, `invite_email` varchar(255) DEFAULT NULL, - `educational-facility` mediumtext, + `educational_facility` mediumtext, PRIMARY KEY (`profile_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1168,7 +1168,7 @@ LOCK TABLES `poli__protector_access` WRITE; /*!40000 ALTER TABLE `poli__protector_access` DISABLE KEYS */; -INSERT INTO `poli__protector_access` VALUES ('::1','/modules/profile/edituser.php','',1503524779),('::1','/','',1503524776),('::1','/modules/profile/admin/field.php?op=edit&id=63','',1503524720),('::1','/modules/profile/admin/field.php?op=edit&id=63','',1503524720),('::1','/modules/profile/admin/field.php?op=edit&id=63','',1503524765),('::1','/modules/profile/admin/field.php?op=edit&id=63','',1503524765); +INSERT INTO `poli__protector_access` VALUES ('::1','/','',1503556972),('::1','/edituser.php','',1503556978),('::1','/modules/profile/edituser.php','',1503556978),('::1','/modules/profile/admin/field.php?op=edit&id=60','',1503556966),('::1','/modules/profile/admin/field.php?op=edit&id=60','',1503556966); /*!40000 ALTER TABLE `poli__protector_access` ENABLE KEYS */; UNLOCK TABLES; @@ -1260,7 +1260,7 @@ LOCK TABLES `poli__session` WRITE; /*!40000 ALTER TABLE `poli__session` DISABLE KEYS */; -INSERT INTO `poli__session` VALUES ('9248079haliop5ciq83br9k6l0',1503524719,'::1','xoopsUserId|s:1:\"1\";xoopsUserGroups|a:5:{i:0;s:1:\"1\";i:1;s:1:\"2\";i:2;s:1:\"6\";i:3;s:1:\"5\";i:4;s:1:\"8\";}protector_last_ip|s:3:\"::1\";XOOPS_TOKEN_SESSION|a:9:{i:0;a:2:{s:2:\"id\";s:32:\"96a2f6309c58af7b0d25bd33e92def99\";s:6:\"expire\";i:1503524722;}i:1;a:2:{s:2:\"id\";s:32:\"57447787e5c409b31288f73e73a4925f\";s:6:\"expire\";i:1503524928;}i:2;a:2:{s:2:\"id\";s:32:\"0a77596798c28239101752d93ddf5a1d\";s:6:\"expire\";i:1503525462;}i:3;a:2:{s:2:\"id\";s:32:\"0552b99e20f212f516ef3c5e7c7a7dbc\";s:6:\"expire\";i:1503525741;}i:5;a:2:{s:2:\"id\";s:32:\"8ef1b04c09f7c0ebb8a69448d22fb4ad\";s:6:\"expire\";i:1503525851;}i:6;a:2:{s:2:\"id\";s:32:\"66f8fbb8be2edbf179826207e4c0dac5\";s:6:\"expire\";i:1503525980;}i:7;a:2:{s:2:\"id\";s:32:\"5ad64a06b95e6291e5b3533ffc213692\";s:6:\"expire\";i:1503526000;}i:8;a:2:{s:2:\"id\";s:32:\"021114928c3c48d46ff927a0d4102b8b\";s:6:\"expire\";i:1503526145;}i:9;a:2:{s:2:\"id\";s:32:\"5e720ed8ac2c903f19cb520d46a74a58\";s:6:\"expire\";i:1503526159;}}'); +INSERT INTO `poli__session` VALUES ('san8qppe0d0mnp15g2vkp3ncb5',1503556919,'::1','xoopsUserId|s:1:\"1\";xoopsUserGroups|a:5:{i:0;s:1:\"1\";i:1;s:1:\"2\";i:2;s:1:\"6\";i:3;s:1:\"5\";i:4;s:1:\"8\";}protector_last_ip|s:3:\"::1\";XOOPS_TOKEN_SESSION|a:4:{i:0;a:2:{s:2:\"id\";s:32:\"6cc0bb34655f16bb70dd8c9fc9665c82\";s:6:\"expire\";i:1503558143;}i:1;a:2:{s:2:\"id\";s:32:\"411facf46ea7512b9f303b908689e0f4\";s:6:\"expire\";i:1503558212;}i:2;a:2:{s:2:\"id\";s:32:\"747578ab7d8ec218baabc80b67e585e6\";s:6:\"expire\";i:1503558346;}i:3;a:2:{s:2:\"id\";s:32:\"986068279cabf3390ce2b69f4ecef748\";s:6:\"expire\";i:1503558358;}}'); /*!40000 ALTER TABLE `poli__session` ENABLE KEYS */; UNLOCK TABLES; @@ -1429,7 +1429,7 @@ LOCK TABLES `poli__users` WRITE; /*!40000 ALTER TABLE `poli__users` DISABLE KEYS */; -INSERT INTO `poli__users` VALUES (1,'Simon Antony Roberts','wishcraft','wis...@us...','http://releases.xoops.org.localhost/','avatars/blank.gif',1501154455,'','Marrickville South, NSW, Australia','',1,'','','','','$2y$10$E.YjXFEkIKb7qSmbgwDlxOQ0vPl/yHl09JVMkLcFeF2mWJrMGe/VK',0,0,7,5,'0',10.0,1503524660,'flat',0,1,0,'Open Source','','',0),(2,'','test','simon@snails.email','','avatars/blank.gif',1501371906,'','',NULL,0,'f0150af8','','','','$2y$10$uqDYa5l1AHC0azBZp/HITOhJX9yUxTqUUNsD/4hjovgC.O6vQSdGG',0,0,0,1,'xbootstrap',0.0,1501371946,'flat',0,1,0,'','','',1); +INSERT INTO `poli__users` VALUES (1,'Simon Antony Roberts','wishcraft','wis...@us...','http://releases.xoops.org.localhost/','avatars/blank.gif',1501154455,'','Marrickville South, NSW, Australia','',1,'','','','','$2y$10$E.YjXFEkIKb7qSmbgwDlxOQ0vPl/yHl09JVMkLcFeF2mWJrMGe/VK',0,0,7,5,'0',10.0,1503556906,'flat',0,1,0,'Open Source','','',0),(2,'','test','simon@snails.email','','avatars/blank.gif',1501371906,'','',NULL,0,'f0150af8','','','','$2y$10$uqDYa5l1AHC0azBZp/HITOhJX9yUxTqUUNsD/4hjovgC.O6vQSdGG',0,0,0,1,'xbootstrap',0.0,1501371946,'flat',0,1,0,'','','',1); /*!40000 ALTER TABLE `poli__users` ENABLE KEYS */; UNLOCK TABLES; @@ -1566,4 +1566,4 @@ /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2017-08-24 7:47:55 +-- Dump completed on 2017-08-24 16:45:27 Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/themes/xbootstrap/style.css =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/themes/xbootstrap/style.css 2017-08-24 05:39:38 UTC (rev 13284) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/themes/xbootstrap/style.css 2017-08-24 06:48:51 UTC (rev 13285) @@ -1669,44 +1669,3 @@ background-repeat: none; padding-left: 16px; } - -#profile .caption-text -{ - font-size: 175% !important; -} - - -#profile .caption-marker -{ - font-size: 295% !important; -} - -#profile input, #profile select -{ - widht: 100% !important;; - font-size: 155% !important;; -} - -.profile-form .odd, .profile-form .even -{ - text-align: left !important; - padding: 4px; -} - -.profile-form radio -{ - margin-right: 8px; - margin-left: 5px; -} - -.profile-form checkbox -{ - margin-right: 4px; - margin-left: 3px; -} - -.profile-form label -{ - width: 29.75% !important; - margin: 2px 2px 1px 1px; -} \ No newline at end of file |
From: <wis...@us...> - 2017-08-24 05:39:41
|
Revision: 13284 http://sourceforge.net/p/xoops/svn/13284 Author: wishcraft Date: 2017-08-24 05:39:38 +0000 (Thu, 24 Aug 2017) Log Message: ----------- fixing theme *form* api call rss ~ Modified Paths: -------------- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf =================================================================== (Binary files differ) |
From: <wis...@us...> - 2017-08-24 05:16:34
|
Revision: 13283 http://sourceforge.net/p/xoops/svn/13283 Author: wishcraft Date: 2017-08-24 05:16:31 +0000 (Thu, 24 Aug 2017) Log Message: ----------- fixing module rss ~ Modified Paths: -------------- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf =================================================================== (Binary files differ) |
From: <wis...@us...> - 2017-08-24 05:10:11
|
Revision: 13282 http://sourceforge.net/p/xoops/svn/13282 Author: wishcraft Date: 2017-08-24 05:10:08 +0000 (Thu, 24 Aug 2017) Log Message: ----------- fixing module rss ~ Modified Paths: -------------- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf =================================================================== (Binary files differ) |
From: <wis...@us...> - 2017-08-24 02:42:34
|
Revision: 13281 http://sourceforge.net/p/xoops/svn/13281 Author: wishcraft Date: 2017-08-24 02:42:32 +0000 (Thu, 24 Aug 2017) Log Message: ----------- XOOPS 2.6 - Themes - xoops_version.php - Definition! Modified Paths: -------------- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt =================================================================== (Binary files differ) Modified: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf =================================================================== (Binary files differ) |
From: <wis...@us...> - 2017-08-24 02:39:27
|
Revision: 13280 http://sourceforge.net/p/xoops/svn/13280 Author: wishcraft Date: 2017-08-24 02:39:25 +0000 (Thu, 24 Aug 2017) Log Message: ----------- XOOPS 2.6 - Themes - xoops_version.php - Definition! Added Paths: ----------- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf Added: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx =================================================================== (Binary files differ) Index: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx =================================================================== --- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx 2017-08-24 02:10:57 UTC (rev 13279) +++ XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx 2017-08-24 02:39:25 UTC (rev 13280) Property changes on: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.docx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt =================================================================== (Binary files differ) Index: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt =================================================================== --- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt 2017-08-24 02:10:57 UTC (rev 13279) +++ XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt 2017-08-24 02:39:25 UTC (rev 13280) Property changes on: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.odt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf =================================================================== (Binary files differ) Index: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf =================================================================== --- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf 2017-08-24 02:10:57 UTC (rev 13279) +++ XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf 2017-08-24 02:39:25 UTC (rev 13280) Property changes on: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Theme - xoops_version.php.pdf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property |
From: <wis...@us...> - 2017-08-24 02:10:59
|
Revision: 13279 http://sourceforge.net/p/xoops/svn/13279 Author: wishcraft Date: 2017-08-24 02:10:57 +0000 (Thu, 24 Aug 2017) Log Message: ----------- XOOPS 2.6 - Module - xoops_version.php - definition document! Added Paths: ----------- XoopsDocumentation/ XoopsDocumentation/core/ XoopsDocumentation/core/XOOPS 2.6/ XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf Added: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx =================================================================== (Binary files differ) Index: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx =================================================================== --- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx 2017-08-23 22:02:49 UTC (rev 13278) +++ XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx 2017-08-24 02:10:57 UTC (rev 13279) Property changes on: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.docx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt =================================================================== (Binary files differ) Index: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt =================================================================== --- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt 2017-08-23 22:02:49 UTC (rev 13278) +++ XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt 2017-08-24 02:10:57 UTC (rev 13279) Property changes on: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.odt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf =================================================================== (Binary files differ) Index: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf =================================================================== --- XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf 2017-08-23 22:02:49 UTC (rev 13278) +++ XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf 2017-08-24 02:10:57 UTC (rev 13279) Property changes on: XoopsDocumentation/core/XOOPS 2.6/XOOPS 2.6 - Module - xoops_version.php.pdf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property |
From: <wis...@us...> - 2017-08-23 22:02:53
|
Revision: 13278 http://sourceforge.net/p/xoops/svn/13278 Author: wishcraft Date: 2017-08-23 22:02:49 +0000 (Wed, 23 Aug 2017) Log Message: ----------- slowly steadly, need to finish consent that backs into webdav! Modified Paths: -------------- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/groups.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/include/common.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/field.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/profile.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/preloads/core.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/register.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/releases-xoops-org.sql *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/themes/xbootstrap/style.css *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/xoops_data/caches/smarty_cache/ab96fc4e-system-xbootstrap-default-page_6666cd76-english-019ede60-a4578f45^%%4C^4C7^4C76E894%%db%3Asystem_homepage.tpl *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/xoops_data/caches/xoops_cache/xoops_ab96fc4e_page_6666cd76-english-019ede60-a4578f45.php Added Paths: ----------- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/admin/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/admin/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/callbacks.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/clients.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/files.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/folders.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/webdavs.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/crons/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/crons/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/footer.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/forgot.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/header.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-01.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-02.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-03.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-04.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-05.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-06.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-07.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-08.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-09.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-10.png *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/include/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/include/data/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/include/data/apache2-nossl-config-template.conf *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/include/data/apache2-ssl-config-template.conf *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/include/data/awstats-config-template.conf *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/include/data/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/include/functions.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/include/htaccess.txt *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/include/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/index.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/admin.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/forms.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/mail_templates/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/main.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/modinfo.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/release.nfo *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/release.xcode *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/english/style.css *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/language/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/preloads/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/sql/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/sql/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/sql/mysql.sql *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/templates/ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/templates/index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/templates/webdav_forgot.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/templates/webdav_index.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/templates/webdav_index_client.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/templates/webdav_index_user.html *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/xoops_version.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/xoops_data/caches/smarty_cache/ab96fc4e-system-xbootstrap-default-page_6666cd76-english-3^%%4C^4C7^4C76E894%%db%3Asystem_homepage.tpl *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/xoops_data/caches/smarty_compile/ab96fc4e-profile-xbootstrap-default^%%F3^F39^F3989731%%db%3Asystem_userform.html.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/xoops_data/caches/xoops_cache/xoops_ab96fc4e_page_6666cd76-english-3.php *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/xoops_data/data/secure.php Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/groups.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/groups.php 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/groups.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -40,4 +40,22 @@ if (!defined('XOOPS_GROUPS_EXTRA')) define('XOOPS_GROUPS_EXTRA', '4,5,6,7,8,9'); +// Educational User Groups +if (!defined('XOOPS_GROUP_PRIMARY')) + define('XOOPS_GROUP_PRIMARY', '11'); +if (!defined('XOOPS_GROUP_SECONDARY')) + define('XOOPS_GROUP_SECONDARY', '12'); +if (!defined('XOOPS_GROUP_TERTIARY')) + define('XOOPS_GROUP_TERTIARY', '13'); +if (!defined('XOOPS_GROUP_VOCATIONAL_YOUTH')) + define('XOOPS_GROUP_VOCATIONAL_YOUTH', '14'); +if (!defined('XOOPS_GROUP_VOCATIONAL_ADULT')) + define('XOOPS_GROUP_VOCATIONAL_ADULT', '15'); +if (!defined('XOOPS_GROUP_RELIGIOUSEDU')) + define('XOOPS_GROUP_RELIGIOUSEDU', '16'); + +// Releases User Groups Defines +if (!defined('XOOPS_GROUPS_EDUCATION')) + define('XOOPS_GROUPS_EDUCATION', '11,12,13,14,15,16'); + ?> \ No newline at end of file Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/include/common.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/include/common.php 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/include/common.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -208,6 +208,7 @@ @session_start(); } + /** * Remove expired session for xoopsUserId */ Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/field.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/field.php 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/field.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -162,7 +162,7 @@ $options = array(); foreach($languages_handler->getObjects($criteria) as $language) $options[$language->getVar('lang_id')] = $language->getVar('name'); - $element = new XoopsFormSelect($caption, $name, $value, 8, true); + $element = new XoopsFormSelect($caption, $name, $value, 11, true); $element->addOptionArray($options); break; Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/profile.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/profile.php 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/class/profile.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -261,7 +261,7 @@ if (count($obj->vars) == 0) { return true; } - $updategroups = $updatespoken = $updatewritten = false; + $updateedu = $updategroups = $updatespoken = $updatewritten = false; if ($obj->vars['spoken_languages']['changed']==true) $updatespoken= true; if ($obj->vars['written_languages']['changed']==true) @@ -268,6 +268,8 @@ $updatewritten= true; if ($obj->vars['account_type']['changed']==true) $updategroups = true; + if ($obj->vars['educational-facility']['changed']==true) + $updateedu = true; $uid = parent::insert($obj, $force); // Updates Spoken Language User References @@ -286,34 +288,34 @@ $langusers_handler->addLanguages('written', $obj->getVar('written_languages'), $uid); } - // Update User Groups - if ($updategroups == true) + // Update Educationals User Groups + if ($updateedu == true) { - $sql = sprintf('DELETE FROM `%s` WHERE `groupid` IN (%s) AND `uid` = %u', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUPS_EXTRA, $uid); + $sql = sprintf('DELETE FROM `%s` WHERE `groupid` IN (%s) AND `uid` = %u', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUPS_EDUCATION, $uid); $GLOBALS['xoopsDB']->queryF($sql); $sql = ''; - foreach($obj->vars['account_type']['value'] as $accounttype) + foreach($obj->vars['educational-facility']['value'] as $edutype) { - switch($accounttype) + switch($edutype) { - case "core": - $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_CORE, $uid); + case "primary": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_PRIMARY, $uid); break; - case "module": - $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_MODULE, $uid); + case "secondary": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_SECONDARY, $uid); break; - case "theme": - $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_THEME, $uid); + case "tertiary": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_TERTIARY, $uid); break; - case "language": - $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_TRANSLATOR, $uid); + case "youth-vocation": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_VOCATIONAL_YOUTH, $uid); break; - case "document": - $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_DOCUMENTATION, $uid); + case "adult-vocation": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_VOCATIONAL_ADULT, $uid); break; - case "testing": - $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_TESTING, $uid); + case "religious": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_RELIGIOUSEDU, $uid); break; } if (!empty($sql)) @@ -321,6 +323,43 @@ trigger_error("SQL Failed: $sql;"); } } + + + // Update User Groups + if ($updategroups == true) + { + $sql = sprintf('DELETE FROM `%s` WHERE `groupid` IN (%s) AND `uid` = %u', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUPS_EXTRA, $uid); + $GLOBALS['xoopsDB']->queryF($sql); + $sql = ''; + foreach($obj->vars['account_type']['value'] as $accounttype) + { + switch($accounttype) + + { + case "core": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_CORE, $uid); + break; + case "module": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_MODULE, $uid); + break; + case "theme": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_THEME, $uid); + break; + case "language": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_TRANSLATOR, $uid); + break; + case "document": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_DOCUMENTATION, $uid); + break; + case "testing": + $sql = sprintf('INSERT INTO `%s` (`groupid`, `uid`) VALUES (%u, %u)', $GLOBALS['xoopsDB']->prefix('groups_users_link'), XOOPS_GROUP_TESTING, $uid); + break; + } + if (!empty($sql)) + if (!$GLOBALS['xoopsDB']->queryF($sql)) + trigger_error("SQL Failed: $sql;"); + } + } return $uid; } Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/preloads/core.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/preloads/core.php 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/preloads/core.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -47,6 +47,26 @@ /** * @param $args */ + public static function eventCoreIncludeCommonEnd($args) + { + + /** + * Gets the Invite Mail Email Address for the Session + */ + if (!isset($_SESSION['invite-email']) && isset($_COOKIE['invite-email']) && !empty($_COOKIE['invite-email']) && checkEmail($_COOKIE['invite-email'])) + { + $_SESSION['invite-email'] = $_COOKIE['invite-email']; + } elseif (!isset($_SESSION['invite-email']) && isset($_REQUEST['inviteemail']) && !empty($_REQUEST['inviteemail']) && checkEmail($_REQUEST['inviteemail'])) + { + $_SESSION['invite-email'] = $_REQUEST['inviteemail']; + setcookie('invite-email', $_REQUEST['inviteemail'], (60*60*24*7*4*76), '/', XOOPS_COOKIE_DOMAIN, true); + } + + } + + /** + * @param $args + */ public static function eventCoreEdituserStart($args) { header('location: ./modules/profile/edituser.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING'])); Modified: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/register.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/register.php 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/profile/register.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -240,6 +240,8 @@ } else { // User inserted! Now insert custom profile fields $profile->setVar('profile_id', $newuser->getVar('uid')); + if (isset($_SESSION['invite-email']) && !empty($_SESSION['invite-email']) && checkEmail($_SESSION['invite-email'])) + $profile_handler->setVar('invite-email', $_SESSION['invite-email']); $profile_handler->insert($profile); // We are good! If this is 'was' a new user then we handle notification Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/admin/index.html =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/admin/index.html (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/admin/index.html 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/admin/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/callbacks.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/callbacks.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/callbacks.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1,78 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavCallbacks extends XoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("callbackid", XOBJ_DTYPE_INT, null, false); + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("clientid", XOBJ_DTYPE_INT, null, false); + $this->initVar("url", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("fields", XOBJ_DTYPE_ARRAY, array(), false); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("called", XOBJ_DTYPE_INT, null, false); + $this->initVar("deleted", XOBJ_DTYPE_INT, null, false); + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavCallbacksHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_callbacks", "WebdavCallbacks", "callbackid", "url"); + } + + +} +?> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/callbacks.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/clients.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/clients.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/clients.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1,175 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavClients extends XoopsObject +{ + + /** + * This is determined in assignVar() & setVar() + */ + var $_staging_file_exists = false; + + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("clientid", XOBJ_DTYPE_INT, null, false); + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("api-url", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("api-calls", XOBJ_DTYPE_INT, null, false); + $this->initVar("api-response", XOBJ_DTYPE_INT, null, false); + $this->initVar("api-result", XOBJ_DTYPE_OTHER, '', false); + $this->initVar("api-errors", XOBJ_DTYPE_INT, null, false); + $this->initVar("api-errored", XOBJ_DTYPE_INT, null, false); + $this->initVar("username", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("password", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("email", XOBJ_DTYPE_TXTBOX, null, false, 196); + $this->initVar("name", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("staging-file", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("staged", XOBJ_DTYPE_INT, null, false); + } + + + + /** + * Assigns Variable to Object + * + * {@inheritDoc} + * @see XoopsObject::assignVar() + */ + function assignVar($key, $value) + { + + static $staged = false; + global $webdavModule, $webdavConfigsList, $webdavConfigs, $webdavConfigsOptions; + switch ($key) + { + case 'staging-file'; + if (!empty($value) && !file_exists(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . $webdavConfigsList['folder_data'] . DIRECTORY_SEPARATOR . 'staging' . DIRECTORY_SEPARATOR . $value)) + { + $staged = true; + $value = ''; + $this->_staging_file_exists = false; + parent::assignVar($key, $value); + return $this->setVar($key, $value); + } elseif (!empty($value) && file_exists(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . $webdavConfigsList['folder_data'] . DIRECTORY_SEPARATOR . 'staging' . DIRECTORY_SEPARATOR . $value)) + { + $staged = false; + $this->_staging_file_exists = true; + } + break; + case 'staged'; + if ($staged == true) + { + $value = time(); + return $this->setVar($key, $value); + } + break; + } + parent::assignVar($key, $value); + } + + /** + * Sets Variable to Object + * + * {@inheritDoc} + * @see XoopsObject::setVar() + */ + function setVar($key, $value) + { + static $staged = false; + global $webdavModule, $webdavConfigsList, $webdavConfigs, $webdavConfigsOptions; + switch ($key) + { + case 'staging-file'; + if (!empty($value) && !file_exists(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . $webdavConfigsList['folder_data'] . DIRECTORY_SEPARATOR . 'staging' . DIRECTORY_SEPARATOR . $value)) + { + $staged = true; + $this->_staging_file_exists = false; + } elseif (!empty($value) && file_exists(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . $webdavConfigsList['folder_data'] . DIRECTORY_SEPARATOR . 'staging' . DIRECTORY_SEPARATOR . $value)) + { + $staged = false; + $this->_staging_file_exists = true; + } + break; + case 'staged'; + if ($staged == true) + { + $value = time(); + } + break; + } + parent::setVar($key, $value); + } + + /** + * For When Object Shuts Down in Memory + */ + function __destruct() + { + if ($this->vars['staging-file']['changed']==true && $this->vars['staged']['changed']==true ) + { + xoops_getModuleHandler('clients', 'webdav')->insert($this, true); + } + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavClientsHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_clients", "WebdavClients", "clientid", "username"); + } + + +} +?> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/clients.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/files.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/files.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/files.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1,88 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavFiles extends XoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("fileid", XOBJ_DTYPE_INT, null, false); + $this->initVar("folderid", XOBJ_DTYPE_INT, null, false); + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("type", XOBJ_DTYPE_ENUM, 'unknown', false, false, false, array('script','image','data','unknown')); + $this->initVar("commonality-key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("releases-hashinfo", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("fingerprint", XOBJ_DTYPE_TXTBOX, null, false, 44); + $this->initVar("path", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("filename", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("mime-type", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("extension", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("bytes", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-edited", XOBJ_DTYPE_INT, null, false); + $this->initVar("found", XOBJ_DTYPE_INT, null, false); + $this->initVar("fingerprinted", XOBJ_DTYPE_INT, null, false); + $this->initVar("shipped", XOBJ_DTYPE_INT, null, false); + $this->initVar("edited", XOBJ_DTYPE_INT, null, false); + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavFilesHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_files", "WebdavFiles", "fileid", "filename"); + } + + +} +?> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/files.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/folders.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/folders.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/folders.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1,95 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavFolders extends XoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("folderid", XOBJ_DTYPE_INT, null, false); + $this->initVar("parent_fid", XOBJ_DTYPE_INT, null, false); + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("renagading", XOBJ_DTYPE_ENUM, 'No', false, 255, false, array('Yes','No')); + $this->initVar("academic-license", XOBJ_DTYPE_ENUM, 'No', false, 255, false, array('Yes','No')); + $this->initVar("license-key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("commonality-key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("releases-hashinfo", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("primary", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("path", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("fingerprint", XOBJ_DTYPE_TXTBOX, null, false, 44); + $this->initVar("folders", XOBJ_DTYPE_INT, null, false); + $this->initVar("deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade", XOBJ_DTYPE_INT, null, false); + $this->initVar("files", XOBJ_DTYPE_INT, null, false); + $this->initVar("edited", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-files", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-renegade", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-edited", XOBJ_DTYPE_INT, null, false); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("hunted", XOBJ_DTYPE_INT, null, false); + $this->initVar("fingerprinted", XOBJ_DTYPE_INT, null, false); + + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavFoldersHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_folders", "WebdavFolders", "folderid", "path"); + } + + +} +?> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/folders.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/index.html =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/index.html (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/index.html 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/webdavs.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/webdavs.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/webdavs.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1,111 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavWebdavs extends XoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("clients", XOBJ_DTYPE_INT, null, false); + $this->initVar("client-apis", XOBJ_DTYPE_INT, null, false); + $this->initVar("username", XOBJ_DTYPE_TXTBOX, null, false, 45); + $this->initVar("hashinfo", XOBJ_DTYPE_TXTBOX, null, false, 15); + $this->initVar("hostname", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("path", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("htpasswd-file", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("apache2-config", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("awstats-config", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("apache2-config-updated", XOBJ_DTYPE_INT, null, false); + $this->initVar("awstats-config-updated", XOBJ_DTYPE_INT, null, false); + $this->initVar("support-ssl", XOBJ_DTYPE_ENUM, 'No', false, 255, false, array('Yes','No')); + $this->initVar("apache2-ssl-updated", XOBJ_DTYPE_INT, null, false); + $this->initVar("awstats-ssl-updated", XOBJ_DTYPE_INT, null, false); + $this->initVar("online", XOBJ_DTYPE_INT, null, false); + $this->initVar("staging-cron", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("salt", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("staged", XOBJ_DTYPE_INT, null, false); + $this->initVar("folders-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("folders-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("folders-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("files-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("files-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("files-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-files-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-files-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-files-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-renegade-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-renegade-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-renegade-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("root-folders", XOBJ_DTYPE_ARRAY, array(), false); + $this->initVar("folders-hunted", XOBJ_DTYPE_INT, null, false); + $this->initVar("files-hunted", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade-hunted", XOBJ_DTYPE_INT, null, false); + + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavWebdavsHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_webdavs", "WebdavWebdavs", "webdavid", "hostname"); + } + + +} +?> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/class/webdavs.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/crons/index.html =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/crons/index.html (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/crons/index.html 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/crons/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/footer.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/footer.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/footer.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1,27 @@ +<?php +/** + * XOOPS Languages management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage languages + * @description Module for fitting languages on xoops + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link http://internetfounder.wordpress.com + */ + + + +include_once XOOPS_ROOT_PATH . "/footer.php"; +?> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/footer.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/forgot.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/forgot.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/forgot.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1,73 @@ +<?php +/** + * XOOPS Languages management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage languages + * @description Module for fitting languages on xoops + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link http://internetfounder.wordpress.com + */ + + + +global $languagesModule, $languagesConfigsList, $languagesConfigs, $languagesConfigsOptions; +global $start, $limit; + +include dirname(__FILE__) . "/header.php"; + +if ($languagesConfigsList['htaccess']) +{ + $url = XOOPS_URL . "/" . $languagesConfigsList['base'] . "/$start/$limit/index" . $languagesConfigsList['html']; + if (!strpos($url, $_SERVER["REQUEST_URI"])) + { + redirect_header($url, 0, ""); + exit(0); + } +} + +include XOOPS_ROOT_PATH . "/header.php"; +// Adds Stylesheet +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL."/modules/languages/language/".$GLOBALS['xoopsConfig']['language'].'/style.css'); + +$languages_handler = xoops_getmodulehandler("languages", "languages"); +$langsusers_handler = xoops_getmodulehandler("users", "languages"); + +$criteria = new CriteriaCompo(new Criteria('1','1')); +$total = $languages_handler->getCount($criteria); +$criteria->setSort("`name`, `code`"); +$criteria->setOrder("ASC"); +$criteria->setLimit($limit); +$criteria->setStart($start); +$lang = array(); +foreach($languages_handler->getObjects($criteria) as $language) +{ + $lang[$language->getVar('lang_id')]['name'] = $language->getVar('name'); + $lang[$language->getVar('lang_id')]['code'] = $language->getVar('code'); + $lang[$language->getVar('lang_id')]['folder'] = (strlen($language->getVar('folder'))==0?strtolower($language->getVar('name')):$language->getVar('folder')); + $lang[$language->getVar('lang_id')]['folder'] = explode(',',$lang[$language->getVar('lang_id')]['folder']); + $lang[$language->getVar('lang_id')]['spoken'] = $langsusers_handler->getLanguageUsersArray('spoken', $language->getVar('lang_id')); + $lang[$language->getVar('lang_id')]['written'] = $langsusers_handler->getLanguageUsersArray('written', $language->getVar('lang_id')); +} +$GLOBALS['xoopsTpl']->assign("languages", $lang); + +xoops_load('XoopsPageNav'); +$pagenav = new XoopsPageNav($total, $limit, $start, 'start', 'limit='.$limit); +$GLOBALS['xoopsTpl']->assign("pagenav", $pagenav->renderNav(5)); + +$GLOBALS['xoopsTpl']->assign("xoops_pagetitle", sprintf(LANGS_MN_INDEX_TITLE, count($lang), $total)); +$GLOBALS['xoopsTpl']->display(__DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . "languages_index.html"); +include_once "footer.php"; +?> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/forgot.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/header.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/header.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/header.php 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1,56 @@ +<?php +/** + * XOOPS Languages management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage languages + * @description Module for fitting languages on xoops + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link http://internetfounder.wordpress.com + */ + + +require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'mainfile.php'; +require_once __DIR__ . "/include/functions.php"; + +$myts =& MyTextSanitizer::getInstance(); + +global $webdavModule, $webdavConfigsList, $webdavConfigs, $webdavConfigsOptions; + +if (empty($webdavModule)) +{ + if (is_a($webdavModule = xoops_getHandler('module')->getByDirname(basename(__DIR__)), "XoopsModule")) + { + if (empty($webdavConfigsList)) + { + $webdavConfigsList = webdav_load_config(); + } + if (empty($webdavConfigs)) + { + $webdavConfigs = xoops_getHandler('config')->getConfigs(new Criteria('conf_modid', $webdavModule->getVar('mid'))); + } + if (empty($webdavConfigsOptions) && !empty($webdavConfigs)) + { + foreach($webdavConfigs as $key => $config) + $webdavConfigsOptions[$config->getVar('conf_name')] = $config->getConfOptions(); + } + } +} + +global $start, $limit, $op; + +$op = empty($_REQUEST["op"]) || !in_array($_REQUEST['op'], array('default', 'save')) ? 'default' : $_REQUEST["op"] ; +$start = intval( empty($_REQUEST["start"]) ? 0 : $_REQUEST["start"] ); +$limit = intval( empty($_REQUEST["limit"]) ? $webdavConfigsList['items_perpage']: $_REQUEST["limit"] ); Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/header.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/index.html =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/index.html (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/index.html 2017-08-23 22:02:49 UTC (rev 13278) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-01.png =================================================================== (Binary files differ) Index: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-01.png =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-01.png 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-01.png 2017-08-23 22:02:49 UTC (rev 13278) Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-01.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-02.png =================================================================== (Binary files differ) Index: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-02.png =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-02.png 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-02.png 2017-08-23 22:02:49 UTC (rev 13278) Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-02.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-03.png =================================================================== (Binary files differ) Index: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-03.png =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-03.png 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-03.png 2017-08-23 22:02:49 UTC (rev 13278) Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-03.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-04.png =================================================================== (Binary files differ) Index: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-04.png =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-04.png 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-04.png 2017-08-23 22:02:49 UTC (rev 13278) Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-04.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-05.png =================================================================== (Binary files differ) Index: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-05.png =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-05.png 2017-08-23 20:44:29 UTC (rev 13277) +++ *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-05.png 2017-08-23 22:02:49 UTC (rev 13278) Property changes on: *.xoops.org (Subdomain APIs & Sites)/releases.xoops.org/modules/webdav/images/windows-05.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: *.... [truncated message content] |
From: <wis...@us...> - 2017-08-23 20:44:34
|
Revision: 13277 http://sourceforge.net/p/xoops/svn/13277 Author: wishcraft Date: 2017-08-23 20:44:29 +0000 (Wed, 23 Aug 2017) Log Message: ----------- Cleaning up errors in SQL and defintions! Added Paths: ----------- XoopsModules/consent/trunk/modules/consent/admin/ XoopsModules/consent/trunk/modules/consent/admin/index.html XoopsModules/consent/trunk/modules/consent/class/ XoopsModules/consent/trunk/modules/consent/class/WideImage/ XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/ XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Image.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/ XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/BMP.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/GD.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/GD2.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/GIF.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/JPEG.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/PNG.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/TGA.php XoopsModules/consent/trunk/modules/consent/class/WideImage/MapperFactory.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/AddNoise.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ApplyConvolution.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ApplyFilter.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ApplyMask.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/AsGrayscale.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/AsNegative.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/AutoCrop.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/CopyChannelsPalette.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/CopyChannelsTrueColor.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/CorrectGamma.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Crop.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Flip.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/GetMask.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Merge.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Mirror.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Resize.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ResizeCanvas.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Rotate.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/RoundCorners.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Unsharp.php XoopsModules/consent/trunk/modules/consent/class/WideImage/OperationFactory.php XoopsModules/consent/trunk/modules/consent/class/WideImage/PaletteImage.php XoopsModules/consent/trunk/modules/consent/class/WideImage/README XoopsModules/consent/trunk/modules/consent/class/WideImage/TrueColorImage.php XoopsModules/consent/trunk/modules/consent/class/WideImage/VERSION XoopsModules/consent/trunk/modules/consent/class/WideImage/WideImage.php XoopsModules/consent/trunk/modules/consent/class/WideImage/gpl.txt XoopsModules/consent/trunk/modules/consent/class/WideImage/index.html XoopsModules/consent/trunk/modules/consent/class/WideImage/lgpl.txt XoopsModules/consent/trunk/modules/consent/class/WideImage/vendor/ XoopsModules/consent/trunk/modules/consent/class/WideImage/vendor/de77/ XoopsModules/consent/trunk/modules/consent/class/WideImage/vendor/de77/BMP.php XoopsModules/consent/trunk/modules/consent/class/WideImage/vendor/de77/TGA.php XoopsModules/consent/trunk/modules/consent/class/agreements.php XoopsModules/consent/trunk/modules/consent/class/batches.php XoopsModules/consent/trunk/modules/consent/class/callbacks.php XoopsModules/consent/trunk/modules/consent/class/clientels.php XoopsModules/consent/trunk/modules/consent/class/emails.php XoopsModules/consent/trunk/modules/consent/class/guardians.php XoopsModules/consent/trunk/modules/consent/class/index.html XoopsModules/consent/trunk/modules/consent/class/mailboxs/ XoopsModules/consent/trunk/modules/consent/class/mailboxs/api.php XoopsModules/consent/trunk/modules/consent/class/mailboxs/imap.php XoopsModules/consent/trunk/modules/consent/class/mailboxs.php XoopsModules/consent/trunk/modules/consent/class/mimetypes.php XoopsModules/consent/trunk/modules/consent/class/objects.php XoopsModules/consent/trunk/modules/consent/class/statistics.php XoopsModules/consent/trunk/modules/consent/class/xcp/ XoopsModules/consent/trunk/modules/consent/class/xcp/XCP-Logo.eps XoopsModules/consent/trunk/modules/consent/class/xcp/XCP-Logo.png XoopsModules/consent/trunk/modules/consent/class/xcp/XCP-Logo.psd XoopsModules/consent/trunk/modules/consent/class/xcp/XCP-Logo.xcf XoopsModules/consent/trunk/modules/consent/class/xcp/class/ XoopsModules/consent/trunk/modules/consent/class/xcp/class/xcp.base.php XoopsModules/consent/trunk/modules/consent/class/xcp/class/xcp.class.php XoopsModules/consent/trunk/modules/consent/class/xcp/class/xcp.enumerator.php XoopsModules/consent/trunk/modules/consent/class/xcp/class/xcp.leaver.php XoopsModules/consent/trunk/modules/consent/class/xcp/debug_base.php XoopsModules/consent/trunk/modules/consent/class/xcp/debug_enumerator.php XoopsModules/consent/trunk/modules/consent/class/xcp/debug_leaver.php XoopsModules/consent/trunk/modules/consent/class/xcp/index.php XoopsModules/consent/trunk/modules/consent/crons/ XoopsModules/consent/trunk/modules/consent/crons/index.html XoopsModules/consent/trunk/modules/consent/header.php XoopsModules/consent/trunk/modules/consent/images/ XoopsModules/consent/trunk/modules/consent/images/1x1.png XoopsModules/consent/trunk/modules/consent/images/index.html XoopsModules/consent/trunk/modules/consent/include/ XoopsModules/consent/trunk/modules/consent/include/data/ XoopsModules/consent/trunk/modules/consent/include/data/batch-csv-template.ods XoopsModules/consent/trunk/modules/consent/include/data/batch-csv-template.xlsx XoopsModules/consent/trunk/modules/consent/include/data/index.html XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-archives.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-audio.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-general.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-images.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-video.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/ XoopsModules/consent/trunk/modules/consent/include/enumerators/approval__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/approval__emails.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/attachments__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/collect__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/day-name__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-agreement-type__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-agreement-type__batches.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-recovery-type__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-target__emails.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-type__emails.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/images__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/index.html XoopsModules/consent/trunk/modules/consent/include/enumerators/method__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/response-sourced__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/response-waiting__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/segment-hour__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/segment-minute__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/segment-month__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/signature__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/ssl__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/type__batches.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/wammy__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/functions.php XoopsModules/consent/trunk/modules/consent/include/index.html XoopsModules/consent/trunk/modules/consent/index.php XoopsModules/consent/trunk/modules/consent/language/ XoopsModules/consent/trunk/modules/consent/language/english/ XoopsModules/consent/trunk/modules/consent/language/english/errors.php XoopsModules/consent/trunk/modules/consent/language/english/index.html XoopsModules/consent/trunk/modules/consent/language/english/mail_templates/ XoopsModules/consent/trunk/modules/consent/language/english/mail_templates/index.html XoopsModules/consent/trunk/modules/consent/language/english/main.php XoopsModules/consent/trunk/modules/consent/language/english/modinfo.php XoopsModules/consent/trunk/modules/consent/language/english/style.css XoopsModules/consent/trunk/modules/consent/language/index.html XoopsModules/consent/trunk/modules/consent/sql/ XoopsModules/consent/trunk/modules/consent/sql/index.html XoopsModules/consent/trunk/modules/consent/sql/mysqli.sql XoopsModules/consent/trunk/modules/consent/sql/tables.diz XoopsModules/consent/trunk/modules/consent/templates/ XoopsModules/consent/trunk/modules/consent/templates/admin/ XoopsModules/consent/trunk/modules/consent/templates/admin/index.html XoopsModules/consent/trunk/modules/consent/templates/index-agreement-created.html XoopsModules/consent/trunk/modules/consent/templates/index-subscribe-consent.html XoopsModules/consent/trunk/modules/consent/templates/index.html XoopsModules/consent/trunk/modules/consent/templates/pdf/ XoopsModules/consent/trunk/modules/consent/templates/pdf/additional-consent.html XoopsModules/consent/trunk/modules/consent/templates/pdf/clientel-consent.html XoopsModules/consent/trunk/modules/consent/templates/pdf/guardian-consent.html XoopsModules/consent/trunk/modules/consent/templates/pdf/index.html XoopsModules/consent/trunk/modules/consent/upload.php XoopsModules/consent/trunk/modules/consent/wizard.php XoopsModules/consent/trunk/modules/consent/xoops_version.php Removed Paths: ------------- XoopsModules/consent/trunk/modules/consent/admin/ XoopsModules/consent/trunk/modules/consent/class/ XoopsModules/consent/trunk/modules/consent/crons/ XoopsModules/consent/trunk/modules/consent/header.php XoopsModules/consent/trunk/modules/consent/images/ XoopsModules/consent/trunk/modules/consent/include/ XoopsModules/consent/trunk/modules/consent/index.php XoopsModules/consent/trunk/modules/consent/language/ XoopsModules/consent/trunk/modules/consent/sql/ XoopsModules/consent/trunk/modules/consent/templates/ XoopsModules/consent/trunk/modules/consent/upload.php XoopsModules/consent/trunk/modules/consent/wizard.php XoopsModules/consent/trunk/modules/consent/xoops_version.php Added: XoopsModules/consent/trunk/modules/consent/admin/index.html =================================================================== --- XoopsModules/consent/trunk/modules/consent/admin/index.html (rev 0) +++ XoopsModules/consent/trunk/modules/consent/admin/index.html 2017-08-23 20:44:29 UTC (rev 13277) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsModules/consent/trunk/modules/consent/admin/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php 2017-08-23 20:44:29 UTC (rev 13277) @@ -0,0 +1,167 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * @package Exceptions + */ + class WideImage_NoFontException extends WideImage_Exception {} + + /** + * @package Exceptions + */ + class WideImage_InvalidFontFileException extends WideImage_Exception {} + + /** + * @package Exceptions + */ + class WideImage_InvalidCanvasMethodException extends WideImage_Exception {} + + /** + * @package WideImage + */ + class WideImage_Canvas + { + protected $handle = 0; + protected $image = null; + protected $font = null; + + /** + * Creates a canvas object that writes to the image passed as a parameter + * + * Shouldn't be used directly, use WideImage_Image::getCanvas() instead. + * + * @param WideImage_Image $img Image object + */ + function __construct($img) + { + $this->handle = $img->getHandle(); + $this->image = $img; + } + + /** + * Sets the active font. Can be an instance of + * WideImage_Font_TTF, WideImage_Font_PS, or WideImage_Font_GDF. + * + * + * + * + * @param object $font Font object to set for writeText() + */ + function setFont($font) + { + $this->font = $font; + } + + /** + * Creates and sets the current font + * + * The supported font types are: TTF/OTF, PS, and GDF. + * Font type is detected from the extension. If the $file parameter doesn't have an extension, TTF font is presumed. + * + * Note: not all parameters are supported by all fonts. + * + * @param string $file Font file name (string) + * @param int $size Font size (supported for TTF/OTF and PS fonts, ignored for GDF) + * @param int $color Text color + * @param int $bgcolor Background color (supported only for PS font, ignored for TTF and PS) + * @return mixed One of the WideImage_Font_* objects + */ + function useFont($file, $size = 12, $color = 0, $bgcolor = null) + { + $p = strrpos($file, '.'); + if ($p === false || $p < strlen($file) - 4) + $ext = 'ttf'; + else + $ext = strtolower(substr($file, $p + 1)); + + if ($ext == 'ttf' || $ext == 'otf') + $font = new WideImage_Font_TTF($file, $size, $color); + elseif ($ext == 'ps') + $font = new WideImage_Font_PS($file, $size, $color, $bgcolor); + elseif ($ext == 'gdf') + $font = new WideImage_Font_GDF($file, $color); + else + throw new WideImage_InvalidFontFileException("'$file' appears to be an invalid font file."); + + $this->setFont($font); + return $font; + } + + /** + * Write text on the image at specified position + * + * You must set a font with a call to WideImage_Canvas::setFont() prior to writing text to the image. + * + * Smart coordinates are supported for $x and $y arguments, but currently only for TTF/OTF fonts. + * + * Example: + * <code> + * $img = WideImage::load('pic.jpg'); + * $canvas = $img->getCanvas(); + * $canvas->useFont('Verdana.ttf', 16, $img->allocateColor(255, 0, 0)); + * $canvas->writeText('right', 'bottom', 'www.website.com'); + * </code> + * + * @param int $x Left + * @param int $y Top + * @param string $text Text to write + * @param int $angle The angle, defaults to 0 + */ + function writeText($x, $y, $text, $angle = 0) + { + if ($this->font === null) + throw new WideImage_NoFontException("Can't write text without a font."); + + $angle = - floatval($angle); + if ($angle < 0) + $angle = 360 + $angle; + $angle = $angle % 360; + + $this->font->writeText($this->image, $x, $y, $text, $angle); + } + + /** + * A magic method that allows you to call any PHP function that starts with "image". + * + * This is a shortcut to call custom functions on the image handle. + * + * Example: + * <code> + * $img = WideImage::load('pic.jpg'); + * $canvas = $img->getCanvas(); + * $canvas->filledRect(10, 10, 20, 30, $img->allocateColor(0, 0, 0)); + * $canvas->line(60, 80, 30, 100, $img->allocateColor(255, 0, 0)); + * </code> + */ + function __call($method, $params) + { + if (function_exists('image' . $method)) + { + array_unshift($params, $this->handle); + call_user_func_array('image' . $method, $params); + } + else + throw new WideImage_InvalidCanvasMethodException("Function doesn't exist: image{$method}."); + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php 2017-08-23 20:44:29 UTC (rev 13277) @@ -0,0 +1,208 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package Internals + **/ + + + /** + * @package Exceptions + */ + class WideImage_InvalidCoordinateException extends WideImage_Exception {} + + /** + * A utility class for smart coordinates + * + * @package Internals + **/ + class WideImage_Coordinate + { + static protected $coord_align = array("left", "center", "right", "top", "middle", "bottom"); + static protected $coord_numeric = array("[0-9]+", "[0-9]+\.[0-9]+", "[0-9]+%", "[0-9]+\.[0-9]+%"); + + /** + * Parses a numeric or string representation of a corrdinate into a structure + * + * @param string $coord Smart coordinate + * @return array Parsed smart coordinate + */ + static function parse($c) + { + $tokens = array(); + $operators = array('+', '-'); + + $flush_operand = false; + $flush_operator = false; + $current_operand = ''; + $current_operator = ''; + $coordinate = strval($c); + $expr_len = strlen($coordinate); + + for ($i = 0; $i < $expr_len; $i++) + { + $char = $coordinate[$i]; + + if (in_array($char, $operators)) + { + $flush_operand = true; + $flush_operator = true; + $current_operator = $char; + } + else + { + $current_operand .= $char; + if ($i == $expr_len - 1) + $flush_operand = true; + } + + if ($flush_operand) + { + if (trim($current_operand) != '') + $tokens[] = array('type' => 'operand', 'value' => trim($current_operand)); + + $current_operand = ''; + $flush_operand = false; + } + + if ($flush_operator) + { + $tokens[] = array('type' => 'operator', 'value' => $char); + $flush_operator = false; + } + } + return $tokens; + } + + /** + * Evaluates the $coord relatively to $dim + * + * @param string $coord A numeric value or percent string + * @param int $dim Dimension + * @param int $sec_dim Secondary dimension (for align) + * @return int Calculated value + */ + static function evaluate($coord, $dim, $sec_dim = null) + { + $comp_regex = implode('|', self::$coord_align) . '|' . implode('|', self::$coord_numeric); + if (preg_match("/^([+-])?({$comp_regex})$/", $coord, $matches)) + { + $sign = intval($matches[1] . "1"); + $val = $matches[2]; + if (in_array($val, self::$coord_align)) + { + if ($sec_dim === null) + { + switch ($val) + { + case 'left': + case 'top': + return 0; + break; + case 'center': + case 'middle': + return $sign * intval($dim / 2); + break; + case 'right': + case 'bottom': + return $sign * $dim; + break; + default: + return null; + } + } + else + { + switch ($val) + { + case 'left': + case 'top': + return 0; + break; + case 'center': + case 'middle': + return $sign * intval($dim / 2 - $sec_dim / 2); + break; + case 'right': + case 'bottom': + return $sign * ($dim - $sec_dim); + break; + default: + return null; + } + } + } + elseif (substr($val, -1) === '%') + return intval(round($sign * $dim * floatval(str_replace('%', '', $val)) / 100)); + else + return $sign * intval(round($val)); + } + } + + /** + * Calculates and fixes a smart coordinate into a numeric value + * + * @param mixed $value Smart coordinate, relative to $dim + * @param int $dim Coordinate to which $value is relative + * @param int $sec_dim Secondary dimension (for align) + * @return int Calculated value + */ + static function fix($value, $dim, $sec_dim = null) + { + $coord_tokens = self::parse($value); + + if (count($coord_tokens) == 0 || $coord_tokens[count($coord_tokens) - 1]['type'] != 'operand') + throw new WideImage_InvalidCoordinateException("Couldn't parse coordinate '$value' properly."); + + $value = 0; + $operation = 1; + foreach ($coord_tokens as $token) + { + if ($token['type'] == 'operand') + { + $operand_value = self::evaluate($token['value'], $dim, $sec_dim); + if ($operation == 1) + $value = $value + $operand_value; + elseif ($operation == -1) + $value = $value - $operand_value; + else + throw new WideImage_InvalidCoordinateException("Invalid coordinate syntax."); + + $operation = 0; + } + elseif ($token['type'] == 'operator') + { + if ($token['value'] == '-') + { + if ($operation == 0) + $operation = -1; + else + $operation = $operation * -1; + } + elseif ($token['value'] == '+') + { + if ($operation == 0) + $operation = '1'; + } + } + } + return $value; + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php 2017-08-23 20:44:29 UTC (rev 13277) @@ -0,0 +1,31 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * Base Exception class + * + * @package Exceptions + **/ + class WideImage_Exception extends RuntimeException {} + \ No newline at end of file Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php 2017-08-23 20:44:29 UTC (rev 13277) @@ -0,0 +1,48 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * GDF font support class + * + * @package WideImage + */ + class WideImage_Font_GDF + { + protected $font; + protected $color; + + function __construct($face, $color) + { + if (is_int($face) && $face >= 1 && $face <= 5) + $this->font = $face; + else + $this->font = imageloadfont($face); + $this->color = $color; + } + + function writeText($image, $x, $y, $text) + { + imagestring($image->getHandle(), $this->font, $x, $y, $text, $this->color); + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php 2017-08-23 20:44:29 UTC (rev 13277) @@ -0,0 +1,60 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * PS font support class + * + * @package WideImage + */ + class WideImage_Font_PS + { + public $size; + public $color; + public $handle; + + function __construct($file, $size, $color, $bgcolor = null) + { + $this->handle = imagepsloadfont($file); + $this->size = $size; + $this->color = $color; + if ($bgcolor === null) + $this->bgcolor = $color; + else + $this->color = $color; + } + + function writeText($image, $x, $y, $text, $angle = 0) + { + if ($image->isTrueColor()) + $image->alphaBlending(true); + + imagepstext($image->getHandle(), $text, $this->handle, $this->size, $this->color, $this->bgcolor, $x, $y, 0, 0, $angle, 4); + } + + function __destruct() + { + imagepsfreefont($this->handle); + $this->handle = null; + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php 2017-08-23 20:44:29 UTC (rev 13277) @@ -0,0 +1,75 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * TTF font support class + * + * @package WideImage + */ + class WideImage_Font_TTF + { + public $face; + public $size; + public $color; + + function __construct($face, $size, $color) + { + $this->face = $face; + $this->size = $size; + $this->color = $color; + } + + /** + * Writes text onto an image + * + * @param WideImage_Image $image + * @param mixed $x smart coordinate + * @param mixed $y smart coordinate + * @param string $text + * @param int $angle Angle in degrees clockwise + */ + function writeText($image, $x, $y, $text, $angle = 0) + { + if ($image->isTrueColor()) + $image->alphaBlending(true); + + $box = imageftbbox($this->size, $angle, $this->face, $text); + $obox = array( + 'left' => min($box[0], $box[2], $box[4], $box[6]), + 'top' => min($box[1], $box[3], $box[5], $box[7]), + 'right' => max($box[0], $box[2], $box[4], $box[6]) - 1, + 'bottom' => max($box[1], $box[3], $box[5], $box[7]) - 1 + ); + $obox['width'] = abs($obox['left']) + abs($obox['right']); + $obox['height'] = abs($obox['top']) + abs($obox['bottom']); + + $x = WideImage_Coordinate::fix($x, $image->getWidth(), $obox['width']); + $y = WideImage_Coordinate::fix($y, $image->getHeight(), $obox['height']); + + $fixed_x = $x - $obox['left']; + $fixed_y = $y - $obox['top']; + + imagettftext($image->getHandle(), $this->size, $angle, $fixed_x, $fixed_y, $this->color, $this->face, $text); + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Image.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Image.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Image.php 2017-08-23 20:44:29 UTC (rev 13277) @@ -0,0 +1,964 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * Thrown when an invalid dimension is passed for some operations + * + * @package Exceptions + */ + class WideImage_InvalidImageDimensionException extends WideImage_Exception {} + + /** + * Thrown when an image can't be saved (returns false by the mapper) + * + * @package Exceptions + */ + class WideImage_UnknownErrorWhileMappingException extends WideImage_Exception {} + + /** + * Base class for images + * + * @package WideImage + */ + abstract class WideImage_Image + { + /** + * Holds the image resource + * @var resource + */ + protected $handle = null; + + /** + * Flag that determines if WideImage should call imagedestroy() upon object destruction + * @var bool + */ + protected $handleReleased = false; + + /** + * Canvas object + * @var WideImage_Canvas + */ + protected $canvas = null; + + /** + * @var string + */ + protected $sdata = null; + + /** + * The base class constructor + * + * @param resource $handle Image handle (GD2 resource) + */ + function __construct($handle) + { + WideImage::assertValidImageHandle($handle); + $this->handle = $handle; + } + + /** + * Cleanup + * + * Destroys the handle via WideImage_Image::destroy() when called by the GC. + */ + function __destruct() + { + $this->destroy(); + } + + /** + * This method destroy the image handle, and releases the image resource. + * + * After this is called, the object doesn't hold a valid image any more. + * No operation should be called after that. + */ + function destroy() + { + if ($this->isValid() && !$this->handleReleased) + imagedestroy($this->handle); + + $this->handle = null; + } + + /** + * Returns the GD image resource + * + * @return resource GD image resource + */ + function getHandle() + { + return $this->handle; + } + + /** + * @return bool True, if the image object holds a valid GD image, false otherwise + */ + function isValid() + { + return WideImage::isValidImageHandle($this->handle); + } + + /** + * Releases the handle + */ + function releaseHandle() + { + $this->handleReleased = true; + } + + /** + * Saves an image to a file + * + * The file type is recognized from the $uri. If you save to a GIF8, truecolor images + * are automatically converted to palette. + * + * This method supports additional parameters: quality (for jpeg images) and + * compression quality and filters (for png images). See http://www.php.net/imagejpeg and + * http://www.php.net/imagepng for details. + * + * Examples: + * <code> + * // save to a GIF + * $image->saveToFile('image.gif'); + * + * // save to a PNG with compression=7 and no filters + * $image->saveToFile('image.png', 7, PNG_NO_FILTER); + * + * // save to a JPEG with quality=80 + * $image->saveToFile('image.jpg', 80); + * + * // save to a JPEG with default quality=100 + * $image->saveToFile('image.jpg'); + * </code> + * + * @param string $uri File location + */ + function saveToFile($uri) + { + $mapper = WideImage_MapperFactory::selectMapper($uri, null); + $args = func_get_args(); + array_unshift($args, $this->getHandle()); + $res = call_user_func_array(array($mapper, 'save'), $args); + if (!$res) + throw new WideImage_UnknownErrorWhileMappingException(get_class($mapper) . " returned an invalid result while saving to $uri"); + } + + /** + * Returns binary string with image data in format specified by $format + * + * Additional parameters may be passed to the function. See WideImage_Image::saveToFile() for more details. + * + * @param string $format The format of the image + * @return string The binary image data in specified format + */ + function asString($format) + { + ob_start(); + $args = func_get_args(); + $args[0] = null; + array_unshift($args, $this->getHandle()); + + $mapper = WideImage_MapperFactory::selectMapper(null, $format); + $res = call_user_func_array(array($mapper, 'save'), $args); + if (!$res) + throw new WideImage_UnknownErrorWhileMappingException(get_class($mapper) . " returned an invalid result while writing the image data"); + + return ob_get_clean(); + } + + /** + * Output a header to browser. + * + * @param $name Name of the header + * @param $data Data + */ + protected function writeHeader($name, $data) + { + header($name . ": " . $data); + } + + /** + * Outputs the image to browser + * + * Sets headers Content-length and Content-type, and echoes the image in the specified format. + * All other headers (such as Content-disposition) must be added manually. + * + * Example: + * <code> + * WideImage::load('image1.png')->resize(100, 100)->output('gif'); + * </code> + * + * @param string $format Image format + */ + function output($format) + { + $args = func_get_args(); + $data = call_user_func_array(array($this, 'asString'), $args); + + $this->writeHeader('Content-length', strlen($data)); + $this->writeHeader('Content-type', WideImage_MapperFactory::mimeType($format)); + echo $data; + } + + /** + * @return int Image width + */ + function getWidth() + { + return imagesx($this->handle); + } + + /** + * @return int Image height + */ + function getHeight() + { + return imagesy($this->handle); + } + + /** + * Allocate a color by RGB values. + * + * @param mixed $R Red-component value or an RGB array (with red, green, blue keys) + * @param int $G If $R is int, this is the green component + * @param int $B If $R is int, this is the blue component + * @return int Image color index + */ + function allocateColor($R, $G = null, $B = null) + { + if (is_array($R)) + return imageColorAllocate($this->handle, $R['red'], $R['green'], $R['blue']); + else + return imageColorAllocate($this->handle, $R, $G, $B); + } + + /** + * @return bool True if the image is transparent, false otherwise + */ + function isTransparent() + { + return $this->getTransparentColor() >= 0; + } + + /** + * @return int Transparent color index + */ + function getTransparentColor() + { + return imagecolortransparent($this->handle); + } + + /** + * Sets the current transparent color index. Only makes sense for palette images (8-bit). + * + * @param int $color Transparent color index + */ + function setTransparentColor($color) + { + return imagecolortransparent($this->handle, $color); + } + + /** + * Returns a RGB array of the transparent color or null if none. + * + * @return mixed Transparent color RGBA array + */ + function getTransparentColorRGB() + { + $total = imagecolorstotal($this->handle); + $tc = $this->getTransparentColor(); + + if ($tc >= $total && $total > 0) + return null; + else + return $this->getColorRGB($tc); + } + + /** + * Returns a RGBA array for pixel at $x, $y + * + * @param int $x + * @param int $y + * @return array RGB array + */ + function getRGBAt($x, $y) + { + return $this->getColorRGB($this->getColorAt($x, $y)); + } + + /** + * Writes a pixel at the designated coordinates + * + * Takes an associative array of colours and uses getExactColor() to + * retrieve the exact index color to write to the image with. + * + * @param int $x + * @param int $y + * @param array $color + */ + function setRGBAt($x, $y, $color) + { + $this->setColorAt($x, $y, $this->getExactColor($color)); + } + + /** + * Returns a color's RGB + * + * @param int $colorIndex Color index + * @return mixed RGBA array for a color with index $colorIndex + */ + function getColorRGB($colorIndex) + { + return imageColorsForIndex($this->handle, $colorIndex); + } + + /** + * Returns an index of the color at $x, $y + * + * @param int $x + * @param int $y + * @return int Color index for a pixel at $x, $y + */ + function getColorAt($x, $y) + { + return imagecolorat($this->handle, $x, $y); + } + + /** + * Set the color index $color to a pixel at $x, $y + * + * @param int $x + * @param int $y + * @param int $color Color index + */ + function setColorAt($x, $y, $color) + { + return imagesetpixel($this->handle, $x, $y, $color); + } + + /** + * Returns closest color index that matches the given RGB value. Uses + * PHP's imagecolorclosest() + * + * @param mixed $R Red or RGBA array + * @param int $G Green component (or null if $R is an RGB array) + * @param int $B Blue component (or null if $R is an RGB array) + * @return int Color index + */ + function getClosestColor($R, $G = null, $B = null) + { + if (is_array($R)) + return imagecolorclosest($this->handle, $R['red'], $R['green'], $R['blue']); + else + return imagecolorclosest($this->handle, $R, $G, $B); + } + + /** + * Returns the color index that exactly matches the given RGB value. Uses + * PHP's imagecolorexact() + * + * @param mixed $R Red or RGBA array + * @param int $G Green component (or null if $R is an RGB array) + * @param int $B Blue component (or null if $R is an RGB array) + * @return int Color index + */ + function getExactColor($R, $G = null, $B = null) + { + if (is_array($R)) + return imagecolorexact($this->handle, $R['red'], $R['green'], $R['blue']); + else + return imagecolorexact($this->handle, $R, $G, $B); + } + + /** + * Copies transparency information from $sourceImage. Optionally fills + * the image with the transparent color at (0, 0). + * + * @param object $sourceImage + * @param bool $fill True if you want to fill the image with transparent color + */ + function copyTransparencyFrom($sourceImage, $fill = true) + { + if ($sourceImage->isTransparent()) + { + $rgba = $sourceImage->getTransparentColorRGB(); + if ($rgba === null) + return; + + if ($this->isTrueColor()) + { + $rgba['alpha'] = 127; + $color = $this->allocateColorAlpha($rgba); + } + else + $color = $this->allocateColor($rgba); + + $this->setTransparentColor($color); + if ($fill) + $this->fill(0, 0, $color); + } + } + + /** + * Fill the image at ($x, $y) with color index $color + * + * @param int $x + * @param int $y + * @param int $color + */ + function fill($x, $y, $color) + { + return imagefill($this->handle, $x, $y, $color); + } + + /** + * Used internally to create Operation objects + * + * @param string $name + * @return object + */ + protected function getOperation($name) + { + return WideImage_OperationFactory::get($name); + } + + /** + * Returns the image's mask + * + * Mask is a greyscale image where the shade defines the alpha channel (black = transparent, white = opaque). + * + * For opaque images (JPEG), the result will be white. For images with single-color transparency (GIF, 8-bit PNG), + * the areas with the transparent color will be black. For images with alpha channel transparenct, + * the result will be alpha channel. + * + * @return WideImage_Image An image mask + **/ + function getMask() + { + return $this->getOperation('GetMask')->execute($this); + } + + /** + * Resize the image to given dimensions. + * + * $width and $height are both smart coordinates. This means that you can pass any of these values in: + * - positive or negative integer (100, -20, ...) + * - positive or negative percent string (30%, -15%, ...) + * - complex coordinate (50% - 20, 15 + 30%, ...) + * + * If $width is null, it's calculated proportionally from $height, and vice versa. + * + * Example (resize to half-size): + * <code> + * $smaller = $image->resize('50%'); + * + * $smaller = $image->resize('100', '100', 'inside', 'down'); + * is the same as + * $smaller = $image->resizeDown(100, 100, 'inside'); + * </code> + * + * @param mixed $width The new width (smart coordinate), or null. + * @param mixed $height The new height (smart coordinate), or null. + * @param string $fit 'inside', 'outside', 'fill' + * @param string $scale 'down', 'up', 'any' + * @return WideImage_Image The resized image + */ + function resize($width = null, $height = null, $fit = 'inside', $scale = 'any') + { + return $this->getOperation('Resize')->execute($this, $width, $height, $fit, $scale); + } + + /** + * Same as WideImage_Image::resize(), but the image is only applied if it is larger then the given dimensions. + * Otherwise, the resulting image retains the source's dimensions. + * + * @param int $width New width, smart coordinate + * @param int $height New height, smart coordinate + * @param string $fit 'inside', 'outside', 'fill' + * @return WideImage_Image resized image + */ + function resizeDown($width = null, $height = null, $fit = 'inside') + { + return $this->resize($width, $height, $fit, 'down'); + } + + /** + * Same as WideImage_Image::resize(), but the image is only applied if it is smaller then the given dimensions. + * Otherwise, the resulting image retains the source's dimensions. + * + * @param int $width New width, smart coordinate + * @param int $height New height, smart coordinate + * @param string $fit 'inside', 'outside', 'fill' + * @return WideImage_Image resized image + */ + function resizeUp($width = null, $height = null, $fit = 'inside') + { + return $this->resize($width, $height, $fit, 'up'); + } + + /** + * Rotate the image for angle $angle clockwise. + * + * Preserves transparency. Has issues when saving to a BMP. + * + * @param int $angle Angle in degrees, clock-wise + * @param int $bgColor color of the new background + * @param bool $ignoreTransparent + * @return WideImage_Image The rotated image + */ + function rotate($angle, $bgColor = null, $ignoreTransparent = true) + { + return $this->getOperation('Rotate')->execute($this, $angle, $bgColor, $ignoreTransparent); + } + + /** + * This method lays the overlay (watermark) on the image. + * + * Hint: if the overlay is a truecolor image with alpha channel, you should leave $pct at 100. + * + * This operation supports alignment notation in coordinates: + * <code> + * $watermark = WideImage::load('logo.gif'); + * $base = WideImage::load('picture.jpg'); + * $result = $base->merge($watermark, "right - 10", "bottom - 10", 50); + * // applies a logo aligned to bottom-right corner with a 10 pixel margin + * </code> + * + * @param WideImage_Image $overlay The overlay image + * @param mixed $left Left position of the overlay, smart coordinate + * @param mixed $top Top position of the overlay, smart coordinate + * @param int $pct The opacity of the overlay + * @return WideImage_Image The merged image + */ + function merge($overlay, $left = 0, $top = 0, $pct = 100) + { + return $this->getOperation('Merge')->execute($this, $overlay, $left, $top, $pct); + } + + /** + * Resizes the canvas of the image, but doesn't scale the content of the image + * + * This operation creates an empty canvas with dimensions $width x $height, filled with + * background color $bg_color and draws the original image onto it at position [$pos_x, $pos_y]. + * + * Arguments $width, $height, $pos_x and $pos_y are all smart coordinates. $width and $height are + * relative to the current image size, $pos_x and $pos_y are relative to the newly calculated + * canvas size. This can be confusing, but it makes sense. See the example below. + * + * The example below loads a 100x150 image and then resizes its canvas to 200% x 100%+20 + * (which evaluates to 200x170). The image is placed at position [10, center+20], which evaluates to [10, 30]. + * <code> + * $image = WideImage::load('someimage.jpg'); // 100x150 + * $white = $image->allocateColor(255, 255, 255); + * $image->resizeCanvas('200%', '100% + 20', 10, 'center+20', $white); + * </code> + * + * The parameter $merge defines whether the original image should be merged onto the new canvas. + * This means it blends transparent color and alpha colors into the background color. If set to false, + * the original image is just copied over, preserving the transparency/alpha information. + * + * You can set the $scale parameter to limit when to resize the canvas. For example, if you want + * to resize the canvas only if the image is smaller than the new size, but leave the image intact + * if it's larger, set it to 'up'. Likewise, if you want to shrink the canvas, but don't want to + * change images that are already smaller, set it to 'down'. + * + * @param mixed $width Width of the new canvas (smart coordinate, relative to current image width) + * @param mixed $height Height of the new canvas (smart coordinate, relative to current image height) + * @param mixed $pos_x x-position of the image (smart coordinate, relative to the new width) + * @param mixed $pos_y y-position of the image (smart coordinate, relative to the new height) + * @param int $bg_color Background color (created with allocateColor or allocateColorAlpha), defaults to null (tries to use a transparent color) + * @param string $scale Possible values: 'up' (enlarge only), 'down' (downsize only), 'any' (resize precisely to $width x $height). Defaults to 'any'. + * @param bool $merge Merge the original image (flatten alpha channel and transparency) or copy it over (preserve). Defaults to false. + * @return WideImage_Image The resulting image with resized canvas + */ + function resizeCanvas($width, $height, $pos_x, $pos_y, $bg_color = null, $scale = 'any', $merge = false) + { + return $this->getOperation('ResizeCanvas')->execute($this, $width, $height, $pos_x, $pos_y, $bg_color, $scale, $merge); + } + + /** + * Returns an image with round corners + * + * You can either set the corners' color or set them transparent. + * + * Note on $smoothness: 1 means jagged edges, 2 is much better, more than 4 doesn't noticeably improve the quality. + * Rendering becomes increasingly slower if you increase smoothness. + * + * Example: + * <code> + * $nice = $ugly->roundCorners(20, $ugly->allocateColor(255, 0, 0), 2); + * </code> + * + * Use $corners parameter to specify which corners to draw rounded. Possible values are + * WideImage::SIDE_TOP_LEFT, WideImage::SIDE_TOP, + * WideImage::SIDE_TOP_RIGHT, WideImage::SIDE_RIGHT, + * WideImage::SIDE_BOTTOM_RIGHT, WideImage::SIDE_BOTTOM, + * WideImage::SIDE_BOTTOM_LEFT, WideImage::SIDE_LEFT, and WideImage::SIDE_ALL. + * You can specify any combination of corners with a + operation, see example below. + * + * Example: + * <code> + * $white = $image->allocateColor(255, 255, 255); + * $diagonal_corners = $image->roundCorners(15, $white, 2, WideImage::SIDE_TOP_LEFT + WideImage::SIDE_BOTTOM_RIGHT); + * $right_corners = $image->roundCorners(15, $white, 2, WideImage::SIDE_RIGHT); + * </code> + * + * @param int $radius Radius of the corners + * @param int $color The color of corners. If null, corners are rendered transparent (slower than using a solid color). + * @param int $smoothness Specify the level of smoothness. Suggested values from 1 to 4. + * @param int $corners Specify which corners to draw (defaults to WideImage::SIDE_ALL = all corners) + * @return WideImage_Image The resulting image with round corners + */ + function roundCorners($radius, $color = null, $smoothness = 2, $corners = 255) + { + return $this->getOperation('RoundCorners')->execute($this, $radius, $color, $smoothness, $corners); + } + + /** + * Returns an image with applied mask + * + * A mask is a grayscale image, where the shade determines the alpha channel. Black is fully transparent + * and white is fully opaque. + * + * @param WideImage_Image $mask The mask image, greyscale + * @param mixed $left Left coordinate, smart coordinate + * @param mixed $top Top coordinate, smart coordinate + * @return WideImage_Image The resulting image + **/ + function applyMask($mask, $left = 0, $top = 0) + { + return $this->getOperation('ApplyMask')->execute($this, $mask, $left, $top); + } + + /** + * Applies a filter + * + * @param int $filter One of the IMG_FILTER_* constants + * @param int $arg1 + * @param int $arg2 + * @param int $arg3 + * @param int $arg4 + * @return WideImage_Image + */ + function applyFilter($filter, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null) + { + return $this->getOperation('ApplyFilter')->execute($this, $filter, $arg1, $arg2, $arg3, $arg4); + } + + /** + * Applies convolution matrix with imageconvolution() + * + * @param array $matrix + * @param float $div + * @param float $offset + * @return WideImage_Image + */ + function applyConvolution($matrix, $div, $offset) + { + return $this->getOperation('ApplyConvolution')->execute($this, $matrix, $div, $offset); + } + + /** + * Returns a cropped rectangular portion of the image + * + * If the rectangle specifies area that is out of bounds, it's limited to the current image bounds. + * + * Examples: + * <code> + * $cropped = $img->crop(10, 10, 150, 200); // crops a 150x200 rect at (10, 10) + * $cropped = $img->crop(-100, -50, 100, 50); // crops a 100x50 rect at the right-bottom of the image + * $cropped = $img->crop('25%', '25%', '50%', '50%'); // crops a 50%x50% rect from the center of the image + * </code> + * + * This operation supports alignment notation in left/top coordinates. + * Example: + * <code> + * $cropped = $img->crop("right", "bottom", 100, 200); // crops a 100x200 rect from right bottom + * $cropped = $img->crop("center", "middle", 50, 30); // crops a 50x30 from the center of the image + * </code> + * + * @param mixed $left Left-coordinate of the crop rect, smart coordinate + * @param mixed $top Top-coordinate of the crop rect, smart coordinate + * @param mixed $width Width of the crop rect, smart coordinate + * @param mixed $height Height of the crop rect, smart coordinate + * @return WideImage_Image The cropped image + **/ + function crop($left = 0, $top = 0, $width = '100%', $height = '100%') + { + return $this->getOperation('Crop')->execute($this, $left, $top, $width, $height); + } + + /** + * Performs an auto-crop on the image + * + * The image is auto-cropped from each of four sides. All sides are + * scanned for pixels that differ from $base_color for more than + * $rgb_threshold in absolute RGB difference. If more than $pixel_cutoff + * differentiating pixels are found, that line is considered to be the crop line for the side. + * If the line isn't different enough, the algorithm procedes to the next line + * towards the other edge of the image. + * + * When the crop rectangle is found, it's enlarged by the $margin value on each of the four sides. + * + * @param int $margin Margin for the crop rectangle, can be negative. + * @param int $rgb_threshold RGB difference which still counts as "same color". + * @param int $pixel_cutoff How many pixels need to be different to mark a cut line. + * @param int $base_color The base color index. If none specified (or null given), left-top pixel is used. + * @return WideImage_Image The cropped image + */ + function autoCrop($margin = 0, $rgb_threshold = 0, $pixel_cutoff = 1, $base_color = null) + { + return $this->getOperation('AutoCrop')->execute($this, $margin, $rgb_threshold, $pixel_cutoff, $base_color); + } + + /** + * Returns a negative of the image + * + * This operation differs from calling WideImage_Image::applyFilter(IMG_FILTER_NEGATIVE), because it's 8-bit and transparency safe. + * This means it will return an 8-bit image, if the source image is 8-bit. If that 8-bit image has a palette transparency, + * the resulting image will keep transparency. + * + * @return WideImage_Image negative of the image + */ + function asNegative() + { + return $this->getOperation('AsNegative')->execute($this); + } + + /** + * Returns a grayscale copy of the image + * + * @return WideImage_Image grayscale copy + **/ + function asGrayscale() + { + return $this->getOperation('AsGrayscale')->execute($this); + } + + /** + * Returns a mirrored copy of the image + * + * @return WideImage_Image Mirrored copy + **/ + function mirror() + { + return $this->getOperation('Mirror')->execute($this); + } + + /** + * Applies the unsharp filter + * + * @param float $amount + * @param float $radius + * @param float $threshold + * @return WideImage_Image Unsharpened copy of the image + **/ + function unsharp($amount, $radius, $threshold) + { + return $this->getOperation('Unsharp')->execute($this, $amount, $radius, $threshold); + } + + /** + * Returns a flipped (mirrored over horizontal line) copy of the image + * + * @return WideImage_Image Flipped copy + **/ + function flip() + { + return $thi... [truncated message content] |
From: <wis...@us...> - 2017-08-23 20:06:32
|
Revision: 13276 http://sourceforge.net/p/xoops/svn/13276 Author: wishcraft Date: 2017-08-23 20:06:29 +0000 (Wed, 23 Aug 2017) Log Message: ----------- Cleaning up errors in SQL and defintions! Modified Paths: -------------- XoopsModules/consent/trunk/modules/consent/class/agreements.php XoopsModules/consent/trunk/modules/consent/class/callbacks.php XoopsModules/consent/trunk/modules/consent/class/emails.php XoopsModules/consent/trunk/modules/consent/class/guardians.php XoopsModules/consent/trunk/modules/consent/class/statistics.php XoopsModules/consent/trunk/modules/consent/header.php XoopsModules/consent/trunk/modules/consent/include/enumerators/response-waiting__agreements.diz XoopsModules/consent/trunk/modules/consent/include/functions.php XoopsModules/consent/trunk/modules/consent/language/english/errors.php XoopsModules/consent/trunk/modules/consent/sql/mysqli.sql XoopsModules/consent/trunk/modules/consent/templates/pdf/clientel-consent.html XoopsModules/consent/trunk/modules/consent/templates/pdf/guardian-consent.html XoopsModules/consent/trunk/modules/consent/xoops_version.php Added Paths: ----------- XoopsModules/consent/trunk/modules/consent/class/clientels.php XoopsModules/consent/trunk/modules/consent/index.php XoopsModules/consent/trunk/modules/consent/language/english/main.php XoopsModules/consent/trunk/modules/consent/templates/index-agreement-created.html XoopsModules/consent/trunk/modules/consent/templates/index-subscribe-consent.html XoopsModules/consent/trunk/modules/consent/wizard.php Modified: XoopsModules/consent/trunk/modules/consent/class/agreements.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/agreements.php 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/class/agreements.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -18,12 +18,13 @@ * @link http://internetfounder.wordpress.com */ -if (!defined('_MD_consent_MODULE_DIRNAME')) { +if (!defined('_MD_CONSENT_MODULE_DIRNAME')) { return false; } //* require_once (__DIR__ . DIRECTORY_SEPARATOR . 'objects.php'); +require_once (__DIR__ . DIRECTORY_SEPARATOR . 'xcp' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'xcp.class.php'); /** * Database Table for Agreements in Legal Consent Module @@ -36,27 +37,27 @@ * `uid` int(13) NOT NULL DEFAULT '0', * `approval` enum('Waiting','Approved','Unapproved') NOT NULL DEFAULT 'Waiting', * `batch-id` int(20) NOT NULL DEFAULT '0', - * `gardian-id` int(20) NOT NULL DEFAULT '0', + * `guardian-id` int(20) NOT NULL DEFAULT '0', * `clientel-id` int(20) NOT NULL DEFAULT '0', * `hashkey` varchar(12) NOT NULL DEFAULT '', * `referee` varchar(18) NOT NULL DEFAULT '', * `callback-url` varchar(255) NOT NULL DEFAULT '', * `svn-paths` longtext, - * `gardian-filename-pdf` varchar(128) NOT NULL DEFAULT '', + * `guardian-filename-pdf` varchar(128) NOT NULL DEFAULT '', * `clientel-filename-pdf` varchar(128) NOT NULL DEFAULT '', - * `gardian-response-file` varchar(128) NOT NULL DEFAULT '', + * `guardian-response-file` varchar(128) NOT NULL DEFAULT '', * `clientel-response-file` varchar(128) NOT NULL DEFAULT '', - * `response-waiting` enum('Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', - * `response-sourced` enum('Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', + * `response-waiting` enum('Guardian','Clientel','Both','None') NOT NULL DEFAULT 'Both', + * `response-sourced` enum('Guardian','Clientel','Both') NOT NULL DEFAULT 'Both', * `response-comment` longtext, * `response-network` longtext, * `response-notified` int(11) NOT NULL DEFAULT '0', * `response-weight` int(11) NOT NULL DEFAULT '0', - * `response-gardian-weight` int(11) NOT NULL DEFAULT '0', + * `response-guardian-weight` int(11) NOT NULL DEFAULT '0', * `response-clientel-weight` int(11) NOT NULL DEFAULT '0', * `email-ids` longtext, - * `email-agreement-type` enum('None','Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', - * `email-recovery-type` enum('None','Gardian','Clientel','Batch') NOT NULL DEFAULT 'None', + * `email-agreement-type` enum('None','Guardian','Clientel','Both') NOT NULL DEFAULT 'Both', + * `email-recovery-type` enum('None','Guardian','Clientel','Batch') NOT NULL DEFAULT 'None', * `email-recovery-guardian-sent` int(11) NOT NULL DEFAULT '0', * `email-recovery-clientel-sent` int(11) NOT NULL DEFAULT '0', * `email-from` varchar(64) NOT NULL DEFAULT '', @@ -64,9 +65,9 @@ * `email-sent` int(11) NOT NULL DEFAULT '0', * `email-views` int(11) NOT NULL DEFAULT '0', * `email-viewed` int(11) NOT NULL DEFAULT '0', - * `email-gardian-sent` int(11) NOT NULL DEFAULT '0', - * `email-gardian-views` int(11) NOT NULL DEFAULT '0', - * `email-gardian-viewed` int(11) NOT NULL DEFAULT '0', + * `email-guardian-sent` int(11) NOT NULL DEFAULT '0', + * `email-guardian-views` int(11) NOT NULL DEFAULT '0', + * `email-guardian-viewed` int(11) NOT NULL DEFAULT '0', * `email-clientel-sent` int(11) NOT NULL DEFAULT '0', * `email-clientel-views` int(11) NOT NULL DEFAULT '0', * `email-clientel-viewed` int(11) NOT NULL DEFAULT '0', @@ -86,7 +87,7 @@ * `reminded` int(11) NOT NULL DEFAULT '0', * `timeout` int(11) NOT NULL DEFAULT '0', * PRIMARY KEY (`id`), - * KEY `SEARCH` (`approval`,`batch-id`,`gardian-id`,`clientel-id`,`hashkey`,`email-agreement-type`,`created`,`emailed`,`response`,`reminde`,`timeout`) USING BTREE KEY_BLOCK_SIZE=32 + * KEY `SEARCH` (`approval`,`batch-id`,`guardian-id`,`clientel-id`,`hashkey`,`email-agreement-type`,`created`,`emailed`,`response`,`reminde`,`timeout`) USING BTREE KEY_BLOCK_SIZE=32 * ) ENGINE=InnoDB DEFAULT CHARSET=utf8; * </code> * @author Simon Roberts (wis...@us...) @@ -105,15 +106,15 @@ self::initVar('uid', XOBJ_DTYPE_INT, null, false); self::initVar('approval', XOBJ_DTYPE_ENUM, 'Waiting', false, false, false, consentEnumeratorValues(basename(__FILE__), 'approval')); self::initVar('batch-id', XOBJ_DTYPE_INT, null, false); - self::initVar('gardian-id', XOBJ_DTYPE_INT, null, false); + self::initVar('guardian-id', XOBJ_DTYPE_INT, null, false); self::initVar('clientel-id', XOBJ_DTYPE_INT, null, false); self::initVar('hashkey', XOBJ_DTYPE_TXTBOX, null, false, 12); self::initVar('referee', XOBJ_DTYPE_TXTBOX, null, false, 18); self::initVar('callback-url', XOBJ_DTYPE_TXTBOX, null, false, 255); self::initVar('svn-paths', XOBJ_DTYPE_ARRAY, array(), false); - self::initVar('gardian-filename-pdf', XOBJ_DTYPE_TXTBOX, null, false, 128); + self::initVar('guardian-filename-pdf', XOBJ_DTYPE_TXTBOX, null, false, 128); self::initVar('clientel-filename-pdf', XOBJ_DTYPE_TXTBOX, null, false, 128); - self::initVar('gardian-response-file', XOBJ_DTYPE_TXTBOX, null, false, 128); + self::initVar('guardian-response-file', XOBJ_DTYPE_TXTBOX, null, false, 128); self::initVar('clientel-response-file', XOBJ_DTYPE_TXTBOX, null, false, 128); self::initVar('response-waiting', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'response-waiting')); self::initVar('response-sourced', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'response-sourced')); @@ -121,7 +122,7 @@ self::initVar('response-network', XOBJ_DTYPE_ARRAY, array(), false); self::initVar('response-notified', XOBJ_DTYPE_INT, null, false); self::initVar('response-weight', XOBJ_DTYPE_INT, null, false); - self::initVar('response-gardian-weight', XOBJ_DTYPE_INT, null, false); + self::initVar('response-guardian-weight', XOBJ_DTYPE_INT, null, false); self::initVar('response-clientel-weight', XOBJ_DTYPE_INT, null, false); self::initVar('email-ids', XOBJ_DTYPE_ARRAY, array(), false); self::initVar('email-agreement-type', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'email-agreement-type')); @@ -133,9 +134,9 @@ self::initVar('email-sent', XOBJ_DTYPE_INT, null, false); self::initVar('email-views', XOBJ_DTYPE_INT, null, false); self::initVar('email-viewed', XOBJ_DTYPE_INT, null, false); - self::initVar('email-gardian-sent', XOBJ_DTYPE_INT, null, false); - self::initVar('email-gardian-views', XOBJ_DTYPE_INT, null, false); - self::initVar('email-gardian-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-guardian-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-guardian-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-guardian-viewed', XOBJ_DTYPE_INT, null, false); self::initVar('email-clientel-sent', XOBJ_DTYPE_INT, null, false); self::initVar('email-clientel-views', XOBJ_DTYPE_INT, null, false); self::initVar('email-clientel-viewed', XOBJ_DTYPE_INT, null, false); @@ -173,7 +174,19 @@ */ class consentAgreementsHandler extends consentXoopsObjectHandler { - + + /** + * + * @var integer + */ + var $created = 0; + + /** + * + * @var integer + */ + var $existing = 0; + /** * Table Name without prefix used @@ -209,5 +222,193 @@ $db = $GLOBAL["xoopsDB"]; parent::__construct($db, $this->tbl, $this->child, $this->identity, $this->envalued); } + + /** + * Checks the form from a submission of the subscription form after being submited + * + * @param array $result + * @param string $errors_array + */ + static public function checkSubscriptionForm($result = array(), $errors_array = false) + { + static $errors = array(); + if (empty($errors)) + { + if (empty($result['guardian-name']) || strlen(trim($result['guardian-name'])) == 0) + $errors['guardian-name'] = _ERR_CONSENT_FORM_GUARDIAN_NAME_MISSING; + if (empty($result['guardian-phone']) || strlen(trim($result['guardian-phone'])) == 0) + $errors['guardian-phone'] = _ERR_CONSENT_FORM_GUARDIAN_PHONE_MISSING; + if (empty($result['guardian-email']) || strlen(trim($result['guardian-email'])) == 0) + $errors['guardian-email'] = _ERR_CONSENT_FORM_GUARDIAN_EMAIL_MISSING; + if (!empty($result['guardian-phone']) && strlen(consentToNumeric($result['guardian-phone'])) < 10) + $errors['guardian-phone'] = _ERR_CONSENT_FORM_GUARDIAN_PHONE_WRONGLENGTH; + if (!empty($result['guardian-name']) && count(explode(' ', $result['guardian-name'])) < 2) + $errors['guardian-name'] = _ERR_CONSENT_FORM_GUARDIAN_NAME_MALFORMED; + if (!empty($result['guardian-email']) && !checkEmail($result['guardian-email'])) + $errors['guardian-email'] = _ERR_CONSENT_FORM_GUARDIAN_EMAIL_MALFORMED; + if (empty($result['clientel-name']) || strlen(trim($result['clientel-name'])) == 0) + $errors['clientel-name'] = _ERR_CONSENT_FORM_CLIENTEL_NAME_MISSING; + if (empty($result['clientel-phone']) || strlen(trim($result['clientel-phone'])) == 0) + $errors['clientel-phone'] = _ERR_CONSENT_FORM_CLIENTEL_PHONE_MISSING; + if (empty($result['clientel-email']) || strlen(trim($result['clientel-email'])) == 0) + $errors['clientel-email'] = _ERR_CONSENT_FORM_CLIENTEL_EMAIL_MISSING; + if (!empty($result['clientel-name']) && count(explode(' ', $result['clientel-name'])) < 2) + $errors['clientel-name'] = _ERR_CONSENT_FORM_CLIENTEL_NAME_MALFORMED; + if (!empty($result['clientel-phone']) && strlen(consentToNumeric($result['clientel-phone'])) < 10) + $errors['clientel-phone'] = _ERR_CONSENT_FORM_CLIENTEL_PHONE_WRONGLENGTH; + if (!empty($result['clientel-email']) && !checkEmail($result['clientel-email'])) + $errors['clientel-email'] = _ERR_CONSENT_FORM_CLIENTEL_EMAIL_MALFORMED; + + $agreementsHandler = $this; + $guardiansHandler = xoops_getModuleHandler('guardians', _MD_CONSENT_MODULE_DIRNAME); + $clientelsHandler = xoops_getModuleHandler('clientels', _MD_CONSENT_MODULE_DIRNAME); + $guardianscriteria = new Criteria('email', $result['guardian-email']); + $clientelscriteria = new Criteria('email', $result['clientel-email']); + $guardianids = $guardiansHandler->getIds($guardianscriteria); + $clientelids = $clientelsHandler->getIds($clientelscriteria); + if (count($guardianids) > 0 && count($clientelids) > 0) + { + $criteria = new CriteriaCompo(new Criteria('guardian-id', "(" . implode(", ", $guardianids) . ')', "IN")); + $criteria->add(new Criteria('clientel-id', "(" . implode(", ", $clientelids) . ')', 'IN')); + $criteria->add(new Criteria('approval', 'Waiting')); + $criteria->add(new Criteria('response-waiting', "('Guardian','Clientel','Both')", "IN")); + $criteria->add(new Criteria('timeout', time(), ">=")); + if ($agreementsHandler->getCount($criteria) > 0) + $errors['agreements'] = _ERR_CONSENT_FORM_AGREEMENT_EXISTINGINQUEUE; + } + } + if ($errors_array == false && empty($errors)) + return true; + elseif ($errors_array == false && !empty($errors)) + return false; + else + return $errors; + } + + + /** + * Get's the error array for a form checked on submission of the subscription form + * + * @param array $result + */ + static public function errorsSubscriptionForm($result = array()) + { + return self::checkSubscriptionForm($result, true); + } + + + /** + * Get the subscription to consent form for submission + * + * @param array $result + */ + static public function getSubscriptionForm($result = array()) + { + if (!isset($result['guardian-name']) || empty($result['guardian-name']) && (!empty($_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['name']) || !empty($_COOKIE[_MD_CONSENT_MODULE_DIRNAME . '-guardian-name']))) + { + if (!empty($_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['name'])) + $result['guardian-name'] = $_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['name']; + elseif (!empty($_COOKIE[_MD_CONSENT_MODULE_DIRNAME . '-guardian-name'])) + $result['guardian-name'] = $_COOKIE[_MD_CONSENT_MODULE_DIRNAME . '-guardian-name']; + } + if (!isset($result['guardian-phone']) || empty($result['guardian-phone']) && (!empty($_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['phone']) || !empty($_COOKIE[_MD_CONSENT_MODULE_DIRNAME . '-guardian-phone']))) + { + if (!empty($_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['phone'])) + $result['guardian-phone'] = $_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['phone']; + elseif (!empty($_COOKIE[_MD_CONSENT_MODULE_DIRNAME . '-guardian-phone'])) + $result['guardian-phone'] = $_COOKIE[_MD_CONSENT_MODULE_DIRNAME . '-guardian-phone']; + } + if (!isset($result['guardian-email']) || empty($result['guardian-email']) && (!empty($_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['email']) || !empty($_COOKIE[_MD_CONSENT_MODULE_DIRNAME . '-guardian-email']))) + { + if (!empty($_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['email'])) + $result['guardian-email'] = $_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['email']; + elseif (!empty($_COOKIE[_MD_CONSENT_MODULE_DIRNAME . '-guardian-email'])) + $result['guardian-email'] = $_COOKIE[_MD_CONSENT_MODULE_DIRNAME . '-guardian-email']; + } + + if (!empty($result['timeout']) && is_string($result['timeout']) && !is_numeric($result['timeout'])) + $result['timeout'] = strtotime($result['timeout'], time()); + + xoops_load('XoopsThemeForm'); + + $form = new XoopsThemeForm(_MN_CONSENT_FORM_SUBCRIPTION, _MD_CONSENT_MODULE_DIRNAME . '-subsription', $_SERVER['REQUEST_URI'], 'post'); + $form->setExtra('enctype="multipart/form-data"'); + $formobj = array(); + $eletray = array(); + $sformobj = array(); + + $formobj['guardian-name'] = new XoopsFormText(_MN_CONSENT_FORM_GUARDIAN_NAME, 'guardian-name', 35, 64, $result['guardian-name']); + $formobj['guardian-name']->setDescription(_MN_CONSENT_FORM_GUARDIAN_NAME_DESC); + $formobj['guardian-email'] = new XoopsFormText(_MN_CONSENT_FORM_GUARDIAN_EMAIL, 'guardian-email', 35, 196, $result['guardian-email']); + $formobj['guardian-email']->setDescription(_MN_CONSENT_FORM_GUARDIAN_EMAIL_DESC); + $formobj['guardian-phone'] = new XoopsFormText(_MN_CONSENT_FORM_GUARDIAN_PHONE, 'guardian-phone', 15, 20, $result['guardian-phone']); + $formobj['guardian-phone']->setDescription(_MN_CONSENT_FORM_GUARDIAN_PHONE_DESC); + $formobj['clientel-name'] = new XoopsFormText(_MN_CONSENT_FORM_CLIENTEL_NAME, 'clientel-name', 35, 64, $result['clientel-name']); + $formobj['clientel-name']->setDescription(_MN_CONSENT_FORM_CLIENTEL_NAME_DESC); + $formobj['clientel-email'] = new XoopsFormText(_MN_CONSENT_FORM_CLIENTEL_EMAIL, 'clientel-email', 35, 196, $result['clientel-email']); + $formobj['clientel-email']->setDescription(_MN_CONSENT_FORM_CLIENTEL_EMAIL_DESC); + $formobj['clientel-phone'] = new XoopsFormText(_MN_CONSENT_FORM_CLIENTEL_PHONE, 'clientel-phone', 15, 20, $result['clientel-phone']); + $formobj['clientel-phone']->setDescription(_MN_CONSENT_FORM_CLIENTEL_PHONE_DESC); + $formobj['timeout'] = new XoopsFormTextDateSelect(_MN_CONSENT_FORM_TIMEOUT, 'timeout', 15, (empty($result['timeout'])? time() + (60*60*24*14): $result['timeout'])); + $formobj['timeout']->setDescription(_MN_CONSENT_FORM_TIMEOUT_DESC); + $formobj['callback-url'] = new XoopsFormText(_MN_CONSENT_FORM_CALLBACK_URL, 'callback-url', 35, 196, $result['callback-url']); + $formobj['callback-url']->setDescription(sprintf(_MN_CONSENT_FORM_CALLBACK_URL_DESC, XOOPS_URL . '/modules/' . _MD_CONSENT_MODULE_DIRNAME . '/callback-example.php')); + $eletray['buttons'] = new XoopsFormElementTray('', ' '); + $sformobj['buttons']['save'] = new XoopsFormButton('', 'submit', _SUBMIT, 'submit'); + $eletray['buttons']->addElement($sformobj['buttons']['save']); + $formobj['buttons'] = $eletray['buttons']; + + $required = array('timeout', 'guardian-name', 'guardian-email', 'guardian-phone', 'clientel-name', 'clientel-email', 'clientel-phone'); + foreach($formobj as $id => $obj) + if (in_array($id, $required)) + $sform->addElement($formobj[$id], true); + else + $sform->addElement($formobj[$id], false); + + $form->addElement(new XoopsFormHidden('op', 'make-agreement')); + return $form->render(); + } + + + /** + * Inserts a New Agreement + * + * @param consentAgreements $object + * @param string $force + * @return unknown + */ + public static function insert(consentAgreements $object, $force = true) + { + if ($object->isNew()) + { + $criteria = new CriteriaCompo(new Criteria('guardian-id', $object->getVar('guardian-id'))); + $criteria->add(new Criteria('clientel-id', $object->getVar('clientel-id'))); + $criteria->add(new Criteria('approval', 'Waiting')); + $criteria->add(new Criteria('response-waiting', "('Guardian','Clientel','Both')", "IN")); + $criteria->add(new Criteria('timeout', time(), ">=")); + if ($this->getCount($criteria)>0) + { + $objs = $this->getObjects($criteria); + if (is_object($objs[0]) && isset($objs[0])) + { + $this->existing++; + return $objs[0]->getVar($this->identity); + } + } + $this->created++; + $object->setVar('created', time()); + $object->setVar('approval', 'Waiting'); + $crc = new xcp($data = $this->created.$object->getVar('uid').$object->getVar('created').$object->getVar('guardian-id').$object->getVar('clientel-id').$object->getVar('batch-id'), mt_rand(0,255), mt_rand(4,10)); + $object->setVar('hashkey', $crc->crc); + $criteria = new CriteriaCompo(new Criteria('1', '1')); + $object->setVar('referee', consentStripeReferee($referee = ($consentConfigsList['agreement-referee'] + $this->getCount($criteria)), 3, strlen($referee))); + if ($object->getVar('timeout') < time()) + $object->setVar('timeout', time() + (3600*24*21)); + $daysdiff = $object->getVar('timeout') - $object->getVar('created') / (3600*24); + $remind = floor($daysdiff / mt_rand(3,7)); + $object->setVar('reminded', time() + (3600*24*$remind)); + } + return parent::insert($object, $force); + } } ?> \ No newline at end of file Modified: XoopsModules/consent/trunk/modules/consent/class/callbacks.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/callbacks.php 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/class/callbacks.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -18,7 +18,7 @@ * @link http://internetfounder.wordpress.com */ -if (!defined('_MD_consent_MODULE_DIRNAME')) { +if (!defined('_MD_CONSENT_MODULE_DIRNAME')) { return false; } Added: XoopsModules/consent/trunk/modules/consent/class/clientels.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/clientels.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/clientels.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -0,0 +1,179 @@ +<?php +/** + * Legal Consent is a module for obtain legal guardianship consent + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://fonts2web.org.uk + * @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) + * @author Simon Roberts (wishcraft) <wis...@us...> + * @subpackage consent + * @description Legal Consent is a module for obtain legal guardianship consent + * @version 1.0.1 + * @link http://internetfounder.wordpress.com + */ + +if (!defined('_MD_CONSENT_MODULE_DIRNAME')) { + return false; +} + +//* +require_once (__DIR__ . DIRECTORY_SEPARATOR . 'objects.php'); +require_once (__DIR__ . DIRECTORY_SEPARATOR . 'xcp' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'xcp.class.php'); + +/** + * Database Table for Clientels in Legal Consent Module + * + * For Table:- + * <code> + * CREATE TABLE `consent_clientels` ( + * `id` int(20) NOT NULL AUTO_INCREMENT, + * `uid` int(13) NOT NULL DEFAULT '0', + * `hashkey` varchar(12) NOT NULL DEFAULT '', + * `name` varchar(64) NOT NULL DEFAULT '', + * `email` varchar(196) NOT NULL DEFAULT '', + * `phone` varchar(20) NOT NULL DEFAULT '', + * `created` int(11) NOT NULL DEFAULT '0', + * `emailed` int(11) NOT NULL DEFAULT '0', + * `response` int(11) NOT NULL DEFAULT '0', + * `undelivered` int(11) NOT NULL DEFAULT '0', + * `recovered` int(11) NOT NULL DEFAULT '0', + * `recovery-id` int(20) NOT NULL DEFAULT '0', + * `agreement-ids` longtext, + * `email-views` int(11) NOT NULL DEFAULT '0', + * `email-viewed` int(11) NOT NULL DEFAULT '0', + * PRIMARY KEY (`id`), + * KEY `SEARCH` (`hashkey`,`name`,`email`,`phone`) USING BTREE KEY_BLOCK_SIZE=32 + * ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + * </code> + * @author Simon Roberts (wis...@us...) + * @copyright copyright (c) 2015 labs.coop + */ +class consentClientels extends consentXoopsObject +{ + + var $handler = 'consentClientelsHandler'; + + function __construct($id = null) + { + + self::initVar('id', XOBJ_DTYPE_INT, null, false); + self::initVar('uid', XOBJ_DTYPE_INT, null, false); + self::initVar('hashkey', XOBJ_DTYPE_TXTBOX, null, false, 12); + self::initVar('name', XOBJ_DTYPE_TXTBOX, null, false, 64); + self::initVar('email', XOBJ_DTYPE_TXTBOX, null, false, 196); + self::initVar('phone', XOBJ_DTYPE_TXTBOX, null, false, 20); + self::initVar('created', XOBJ_DTYPE_INT, null, false); + self::initVar('emailed', XOBJ_DTYPE_INT, null, false); + self::initVar('response', XOBJ_DTYPE_INT, null, false); + self::initVar('undelivered', XOBJ_DTYPE_INT, null, false); + self::initVar('recovered', XOBJ_DTYPE_INT, null, false); + self::initVar('recovery-id', XOBJ_DTYPE_INT, null, false); + self::initVar('agreement-ids', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('email-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-viewed', XOBJ_DTYPE_INT, null, false); + + if (!empty($id) && !is_null($id)) + { + $handler = new $this->handler; + self::assignVars($handler->get($id)->getValues(array_keys($this->vars))); + } + + } + +} + + +/** + * Handler Class for Clientels + * @author Simon Roberts (wis...@us...) + * @copyright copyright (c) 2015 labs.coop + */ +class consentClientelsHandler extends consentXoopsObjectHandler +{ + + /** + * + * @var integer + */ + var $created = 0; + + /** + * + * @var integer + */ + var $existing = 0; + + /** + * Table Name without prefix used + * + * @var string + */ + var $tbl = 'consent_clientels'; + + /** + * Child Object Handling Class + * + * @var string + */ + var $child = 'consentClientels'; + + /** + * Child Object Identity Key + * + * @var string + */ + var $identity = 'id'; + + /** + * Child Object Default Envaluing Costs + * + * @var string + */ + var $envalued = 'value'; + + function __construct(&$db) + { + if (!is_object($db)) + $db = $GLOBAL["xoopsDB"]; + parent::__construct($db, $this->tbl, $this->child, $this->identity, $this->envalued); + } + + /** + * Inserts a New Clientel + * + * @param consentClientels $object + * @param string $force + * @return unknown + */ + public static function insert(consentClientels $object, $force = true) + { + if ($object->isNew()) + { + $criteria = new CriteriaCompo(new Criteria('name', $object->getVar('name'))); + $criteria->add(new Criteria('email', $object->getVar('email'))); + $criteria->add(new Criteria('phone', $object->getVar('phone'))); + $criteria->add(new Criteria('uid', $object->getVar('uid'))); + if ($this->getCount($criteria)>0) + { + $objs = $this->getObjects($criteria); + if (is_object($objs[0]) && isset($objs[0])) + { + $this->existing++; + return $objs[0]->getVar($this->identity); + } + } + $this->created++; + $object->setVar('created', time()); + $crc = new xcp($data = $this->created.$object->getVar('uid').$object->getVar('created').$object->getVar('name').$object->getVar('email').$object->getVar('phone'), mt_rand(0,255), mt_rand(4,10)); + $object->setVar('hashkey', $crc->crc); + } + return parent::insert($object, $force); + } +} +?> \ No newline at end of file Property changes on: XoopsModules/consent/trunk/modules/consent/class/clientels.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: XoopsModules/consent/trunk/modules/consent/class/emails.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/emails.php 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/class/emails.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -18,7 +18,7 @@ * @link http://internetfounder.wordpress.com */ -if (!defined('_MD_consent_MODULE_DIRNAME')) { +if (!defined('_MD_CONSENT_MODULE_DIRNAME')) { return false; } Modified: XoopsModules/consent/trunk/modules/consent/class/guardians.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/guardians.php 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/class/guardians.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -18,12 +18,13 @@ * @link http://internetfounder.wordpress.com */ -if (!defined('_MD_consent_MODULE_DIRNAME')) { +if (!defined('_MD_CONSENT_MODULE_DIRNAME')) { return false; } //* require_once (__DIR__ . DIRECTORY_SEPARATOR . 'objects.php'); +require_once (__DIR__ . DIRECTORY_SEPARATOR . 'xcp' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'xcp.class.php'); /** * Database Table for Guardians in Legal Consent Module @@ -95,9 +96,19 @@ */ class consentGuardiansHandler extends consentXoopsObjectHandler { - - /** + * + * @var integer + */ + var $created = 0; + + /** + * + * @var integer + */ + var $existing = 0; + + /** * Table Name without prefix used * * @var string @@ -131,5 +142,37 @@ $db = $GLOBAL["xoopsDB"]; parent::__construct($db, $this->tbl, $this->child, $this->identity, $this->envalued); } + + /** + * Inserts a New Gardian + * + * @param consentGuardians $object + * @param string $force + * @return unknown + */ + public static function insert(consentGuardians $object, $force = true) + { + if ($object->isNew()) + { + $criteria = new CriteriaCompo(new Criteria('name', $object->getVar('name'))); + $criteria->add(new Criteria('email', $object->getVar('email'))); + $criteria->add(new Criteria('phone', $object->getVar('phone'))); + $criteria->add(new Criteria('uid', $object->getVar('uid'))); + if ($this->getCount($criteria)>0) + { + $objs = $this->getObjects($criteria); + if (is_object($objs[0]) && isset($objs[0])) + { + $this->existing++; + return $objs[0]->getVar($this->identity); + } + } + $this->created++; + $object->setVar('created', time()); + $crc = new xcp($data = $this->created.$object->getVar('uid').$object->getVar('created').$object->getVar('name').$object->getVar('email').$object->getVar('phone'), mt_rand(0,255), mt_rand(4,10)); + $object->setVar('hashkey', $crc->crc); + } + return parent::insert($object, $force); + } } ?> \ No newline at end of file Modified: XoopsModules/consent/trunk/modules/consent/class/statistics.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/statistics.php 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/class/statistics.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -18,7 +18,7 @@ * @link http://internetfounder.wordpress.com */ -if (!defined('_MD_consent_MODULE_DIRNAME')) { +if (!defined('_MD_CONSENT_MODULE_DIRNAME')) { return false; } Modified: XoopsModules/consent/trunk/modules/consent/header.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/header.php 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/header.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -39,8 +39,6 @@ if (empty($consentConfigsList)) { $consentConfigsList = xoops_gethandler('config')->getConfigList($consentModule->getVar('mid')); - if (!defined('_MD_CONSENT_DEFAULT_TWITTER')) - define('_MD_CONSENT_DEFAULT_TWITTER',$consentConfigsList['username']); } if (empty($consentConfigs)) { Modified: XoopsModules/consent/trunk/modules/consent/include/enumerators/response-waiting__agreements.diz =================================================================== --- XoopsModules/consent/trunk/modules/consent/include/enumerators/response-waiting__agreements.diz 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/include/enumerators/response-waiting__agreements.diz 2017-08-23 20:06:29 UTC (rev 13276) @@ -1,3 +1,4 @@ Gardian Clientel -Both \ No newline at end of file +Both +None \ No newline at end of file Modified: XoopsModules/consent/trunk/modules/consent/include/functions.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/include/functions.php 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/include/functions.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -17,7 +17,105 @@ * @version 1.0.1 * @link http://internetfounder.wordpress.com */ - + + + + +if (!function_exists('consentStripeReferee')) +{ + /** + * Stipes the Referee Key + * + * @param unknown $referee + * @return mixed + */ + function consentStripeReferee($referee = '', $num = 3, $length = 18) + { + $uu = 0; + $strip = floor(strlen($referee) / $num); + $strlen = strlen($referee); + $ret = ''; + for ($i = 0; $i < $strlen; ++$i) { + if ($i < $length) { + ++$uu; + if ($uu == $strip) { + $ret .= substr($referee, $i, 1) . '-'; + $uu = 0; + } else { + if (substr($referee, $i, 1) != '-') { + $ret .= substr($referee, $i, 1); + } else { + $uu--; + } + } + } + } + $ret = str_replace('--', '-', $ret); + if (substr($ret, 0, 1) == '-') { + $ret = substr($ret, 2, strlen($ret)); + } + if (substr($ret, strlen($ret) - 1, 1) == '-') { + $ret = substr($ret, 0, strlen($ret) - 1); + } + + return $ret; + } +} + +if (!function_exists('consentSEF')) +{ + + /** + * Xoops safe encoded url elements + * + * @param unknown $datab + * @param string $char + * @return string + */ + function consentSEF($datab, $char ='-') + { + $replacement_chars = array(); + $accepted = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","m","o","p","q", + "r","s","t","u","v","w","x","y","z","0","9","8","7","6","5","4","3","2","1"); + for($i=0;$i<256;$i++){ + if (!in_array(strtolower(chr($i)),$accepted)) + $replacement_chars[] = chr($i); + } + $return_data = (str_replace($replacement_chars,$char,$datab)); + while(substr($return_data, 0, 1) == $char) + $return_data = substr($return_data, 1, strlen($return_data)-1); + while(substr($return_data, strlen($return_data)-1, 1) == $char) + $return_data = substr($return_data, 0, strlen($return_data)-1); + while(strpos($return_data, $char . $char)) + $return_data = str_replace($char . $char, $char, $return_data); + return(strtolower($return_data)); + } +} + + +if (!function_exists('consentToNumeric')) +{ + + /** + * Xoops safe encoded url elements + * + * @param unknown $datab + * @param string $char + * @return string + */ + function consentToNumeric($datab) + { + $replacement_chars = array(); + $accepted = array("0","9","8","7","6","5","4","3","2","1"); + for($i=0;$i<256;$i++){ + if (!in_array(strtolower(chr($i)),$accepted)) + $replacement_chars[] = chr($i); + } + $return_data = (str_replace($replacement_chars,'',$datab)); + return(strtolower($return_data)); + } +} + if (!function_exists("consentEnumeratorValues")) { /** * Loads a field enumerator values Added: XoopsModules/consent/trunk/modules/consent/index.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/index.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/index.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -0,0 +1,87 @@ +<?php +/** + * Legal Consent is a module for obtain legal guardianship consent + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://fonts2web.org.uk + * @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) + * @author Simon Roberts (wishcraft) <wis...@us...> + * @subpackage consent + * @description Legal Consent is a module for obtain legal guardianship consent + * @version 1.0.1 + * @link http://internetfounder.wordpress.com + */ + + + require_once __DIR__ . DIRECTORY_SEPARATOR . 'header.php'; + + xoops_load('XoopsSecurity'); + + $op = ((!isset($_REQUEST['op']) || empty($_REQUEST['op'])) ? 'default' : (string)$_REQUEST['op']); + + switch($op) + { + case 'make-agreement': + if (xoops_getModuleHandler('agreements', _MD_CONSENT_MODULE_DIRNAME)->checkSubscriptionForm($_REQUEST, false)) + { + $agreementsHandler = xoops_getModuleHandler('agreements', _MD_CONSENT_MODULE_DIRNAME); + $guardiansHandler = xoops_getModuleHandler('guardians', _MD_CONSENT_MODULE_DIRNAME); + $clientelsHandler = xoops_getModuleHandler('clientels', _MD_CONSENT_MODULE_DIRNAME); + + $obj = $guardiansHandler->create(); + if (is_object($GLOBALS['xoopsUser'])) + $obj->setVar('uid', $GLOBALS['xoopsUser']->getVar('uid')); + $obj->setVar('name', $_REQUEST['guardian-name']); + $obj->setVar('email', $_REQUEST['guardian-email']); + $obj->setVar('phone', $_REQUEST['guardian-phone']); + $guardian = $guardiansHandler->get($guardianid = $guardiansHandler->insert($obj)); + + setcookie(_MD_CONSENT_MODULE_DIRNAME . '-guardian-name', $_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['name'] = $_REQUEST['guardian-name'], 60*60*24*14*14*9, '/', XOOPS_COOKIE_DOMAIN, true); + setcookie(_MD_CONSENT_MODULE_DIRNAME . '-guardian-email', $_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['email'] = $_REQUEST['guardian-email'], 60*60*24*14*14*9, '/', XOOPS_COOKIE_DOMAIN, true); + setcookie(_MD_CONSENT_MODULE_DIRNAME . '-guardian-phone', $_SESSION[_MD_CONSENT_MODULE_DIRNAME]['guardian']['phone'] = $_REQUEST['guardian-phone'], 60*60*24*14*14*9, '/', XOOPS_COOKIE_DOMAIN, true); + + $obj = $clientelsHandler->create(); + if (is_object($GLOBALS['xoopsUser'])) + $obj->setVar('uid', $GLOBALS['xoopsUser']->getVar('uid')); + $obj->setVar('name', $_REQUEST['clientel-name']); + $obj->setVar('email', $_REQUEST['clientel-email']); + $obj->setVar('phone', $_REQUEST['clientel-phone']); + $clientel = $clientelsHandler->get($clientelid = $clientelsHandler->insert($obj)); + + $obj = $agreementsHandler->create(); + if (is_object($GLOBALS['xoopsUser'])) + $obj->setVar('uid', $GLOBALS['xoopsUser']->getVar('uid')); + $obj->setVar('guardian-id', $guardianid); + $obj->setVar('clientel-id', $clientelid); + $obj->setVar('timeout', strtotime($_REQUEST['timeout'])); + $obj->setVar('callback-url', $_REQUEST['callback-url']); + $agreement = $agreementsHandler->get($agreementid = $agreementsHandler->insert($obj, true)); + + require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'header.php'; + if (is_object($GLOBALS['xoTheme'])) + $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/' . _MD_CONSENT_MODULE_DIRNAME . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/style.css'); + $GLOBALS['xoopsTpl']->assign('guardian', $guardian->getValues(array('name','email','phone','hashkey','id','created'))); + $GLOBALS['xoopsTpl']->assign('clientel', $clientel->getValues(array('name','email','phone','hashkey','id','created'))); + $GLOBALS['xoopsTpl']->assign('agreement', $agreement->getValues(array('hashkey','referee','created','timeout','id'))); + $GLOBALS['xoopsTpl']->display(__DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'index-agreement-created.html'); + require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'footer.php'; + + break; + } + default: + require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'header.php'; + if (is_object($GLOBALS['xoTheme'])) + $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/' . _MD_CONSENT_MODULE_DIRNAME . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/style.css'); + $GLOBALS['xoopsTpl']->assign('form', xoops_getModuleHandler('agreements', _MD_CONSENT_MODULE_DIRNAME)->getSubscriptionForm($_REQUEST)); + $GLOBALS['xoopsTpl']->assign('errors', xoops_getModuleHandler('agreements', _MD_CONSENT_MODULE_DIRNAME)->errorsSubscriptionForm($_REQUEST)); + $GLOBALS['xoopsTpl']->display(__DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'index-subscribe-consent.html'); + require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'footer.php'; + break; + } + \ No newline at end of file Property changes on: XoopsModules/consent/trunk/modules/consent/index.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: XoopsModules/consent/trunk/modules/consent/language/english/errors.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/language/english/errors.php 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/language/english/errors.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -21,4 +21,19 @@ */ +// Errors for Single Subscription to Consent +define('_ERR_CONSENT_FORM_GUARDIAN_NAME_MISSING','Guardian\'s Name is empty and missing'); +define('_ERR_CONSENT_FORM_GUARDIAN_PHONE_MISSING','Guardian\'s Phone is empty and missing'); +define('_ERR_CONSENT_FORM_GUARDIAN_EMAIL_MISSING','Guardian\'s eMail is empty and missing'); +define('_ERR_CONSENT_FORM_GUARDIAN_PHONE_WRONGLENGTH','Guardian\'s Phone must contain at least 10 numbers ~ include country code+area code!'); +define('_ERR_CONSENT_FORM_GUARDIAN_NAME_MALFORMED','Guardian\'s Name must consist of at least two words seperated by a space'); +define('_ERR_CONSENT_FORM_GUARDIAN_EMAIL_MALFORMED','Guardian\'s eMail is malformed and not an email address'); +define('_ERR_CONSENT_FORM_CLIENTEL_NAME_MISSING','Clientel\'s Name is empty and missing'); +define('_ERR_CONSENT_FORM_CLIENTEL_PHONE_MISSING','Clientel\'s Phone is empty and missing'); +define('_ERR_CONSENT_FORM_CLIENTEL_EMAIL_MISSING','Clientel\'s eMail is empty and missing'); +define('_ERR_CONSENT_FORM_CLIENTEL_PHONE_WRONGLENGTH','Clientel\'s Phone must contain at least 10 numbers ~ include country code+area code!'); +define('_ERR_CONSENT_FORM_CLIENTEL_NAME_MALFORMED','Clientel\'s Name must consist of at least two words seperated by a space'); +define('_ERR_CONSENT_FORM_CLIENTEL_EMAIL_MALFORMED','Clientel\'s eMail is malformed and not an email address'); +define('_ERR_CONSENT_FORM_AGREEMENT_EXISTINGINQUEUE','Guardian+Clientel is already exists in a current consent request agreements!'); + ?> \ No newline at end of file Added: XoopsModules/consent/trunk/modules/consent/language/english/main.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/language/english/main.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/language/english/main.php 2017-08-23 20:06:29 UTC (rev 13276) @@ -0,0 +1,44 @@ +<?php +/** + * Legal Consent is a module for obtain legal guardianship consent + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://fonts2web.org.uk + * @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) + * @author Simon Roberts (wishcraft) <wis...@us...> + * @subpackage consent + * @description Legal Consent is a module for obtain legal guardianship consent + * @version 1.0.1 + * @link http://internetfounder.wordpress.com + */ + +// Index Consent Subscription Form +define('_MN_CONSENT_INDEX_H1','Subcription to Consent for Gardian + Clientel'); +define('_MN_CONSENT_INDEX_P1','Below is a form that you will be able to subscribe to the guardian consent agreements on this site, you will be able to fill this form out per youth or young adult you are getting or giving consent for the adult based workshops, classes or roles in this agreement, fill out the subscription form below as you see fit!'); +define('_MN_CONSENT_INDEX_H2','Errors made on Form'); +define('_MN_CONSENT_INDEX_P2','Make sure you have all the details above correct before you submit this form, it will email you the consent forms one of each for the guardian and one for the clientel to return either by email or the upload link...'); + +// Guardian+Clientel Consent Single Subscription Form +define('_MN_CONSENT_FORM_SUBCRIPTION','New Consent Agreement Subscription'); +define('_MN_CONSENT_FORM_GUARDIAN_NAME','Guardian\'s Name'); +define('_MN_CONSENT_FORM_GUARDIAN_NAME_DESC','This is at least first + last name of the guardian representing the client'); +define('_MN_CONSENT_FORM_GUARDIAN_EMAIL','Guardian\'s eMail'); +define('_MN_CONSENT_FORM_GUARDIAN_EMAIL_DESC','This is the eMail for the guardian'); +define('_MN_CONSENT_FORM_GUARDIAN_PHONE','Guardian\'s Phone'); +define('_MN_CONSENT_FORM_GUARDIAN_PHONE_DESC','This is the phone number for the guardian (min. 10 numbers)'); +define('_MN_CONSENT_FORM_CLIENTEL_NAME','Clientel\'s Name'); +define('_MN_CONSENT_FORM_CLIENTEL_NAME_DESC','This is at least first + last name of the client repesented by the guardian'); +define('_MN_CONSENT_FORM_CLIENTEL_EMAIL','Clientel\'s eMail'); +define('_MN_CONSENT_FORM_CLIENTEL_EMAIL_DESC','This is the eMail for the client that is the youth consentee'); +define('_MN_CONSENT_FORM_CLIENTEL_PHONE','Clientel\'s Phone'); +define('_MN_CONSENT_FORM_CLIENTEL_PHONE_DESC','This is the phone number for the clientel (min. 10 numbers)'); +define('_MN_CONSENT_FORM_TIMEOUT','Event Consent Timeout'); +define('_MN_CONSENT_FORM_TIMEOUT_DESC','This is the absolute date all consent forms must be returned by'); +define('_MN_CONSENT_FORM_CALLBACK_URL','URL recieving API callback notifications'); +define('_MN_CONSENT_FORM_CALLBACK_URL_DESC','This is a URL which recieves peroidically api calls for notifications to do with this agreement.<br /><br />You can see the example of the callbacks recieved with the following example: <a href="%s" target="_blank">callback-examples.php</a>!'); \ No newline at end of file Property changes on: XoopsModules/consent/trunk/modules/consent/language/english/main.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: XoopsModules/consent/trunk/modules/consent/sql/mysqli.sql =================================================================== --- XoopsModules/consent/trunk/modules/consent/sql/mysqli.sql 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/sql/mysqli.sql 2017-08-23 20:06:29 UTC (rev 13276) @@ -14,8 +14,8 @@ `clientel-filename-pdf` varchar(128) NOT NULL DEFAULT '', `gardian-response-file` varchar(128) NOT NULL DEFAULT '', `clientel-response-file` varchar(128) NOT NULL DEFAULT '', - `response-waiting` enum('Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', - `response-sourced` enum('Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', + `response-waiting` enum('Guardian','Clientel','Both','None') NOT NULL DEFAULT 'Both', + `response-sourced` enum('Guardian','Clientel','Both') NOT NULL DEFAULT 'Both', `response-comment` longtext, `response-network` longtext, `response-notified` int(11) NOT NULL DEFAULT '0', @@ -23,8 +23,8 @@ `response-gardian-weight` int(11) NOT NULL DEFAULT '0', `response-clientel-weight` int(11) NOT NULL DEFAULT '0', `email-ids` longtext, - `email-agreement-type` enum('None','Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', - `email-recovery-type` enum('None','Gardian','Clientel','Batch') NOT NULL DEFAULT 'None', + `email-agreement-type` enum('None','Guardian','Clientel','Both') NOT NULL DEFAULT 'Both', + `email-recovery-type` enum('None','Guardian','Clientel','Batch') NOT NULL DEFAULT 'None', `email-recovery-guardian-sent` int(11) NOT NULL DEFAULT '0', `email-recovery-clientel-sent` int(11) NOT NULL DEFAULT '0', `email-from` varchar(64) NOT NULL DEFAULT '', @@ -73,7 +73,7 @@ `cc` longtext, `bcc` longtext, `callback-url` varchar(255) NOT NULL DEFAULT '', - `email-agreement-type` enum('Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', + `email-agreement-type` enum('Guardian','Clientel','Both') NOT NULL DEFAULT 'Both', `csv-lines` int(11) NOT NULL DEFAULT '0', `csv-bytes` int(11) NOT NULL DEFAULT '0', `csv-md5` varchar(32) NOT NULL DEFAULT ',', @@ -168,7 +168,7 @@ `id` int(32) NOT NULL AUTO_INCREMENT, `approval` enum('Delivered','Undelivered','Unknown') NOT NULL DEFAULT 'Unknown', `email-type` enum('Agreement','Reminder','Recovery','Progress','Unknown') NOT NULL DEFAULT 'Unknown', - `email-target` enum('Batch','Gardian','Clientel','Webmaster','Unknown') NOT NULL DEFAULT 'Unknown', + `email-target` enum('Batch','Guardian','Clientel','Webmaster','Unknown') NOT NULL DEFAULT 'Unknown', `agreement-id` int(20) NOT NULL DEFAULT '0', `batch-id` int(20) NOT NULL DEFAULT '0', `gardian-id` int(20) NOT NULL DEFAULT '0', Added: XoopsModules/consent/trunk/modules/consent/templates/index-agreement-created.html =================================================================== --- XoopsModules/consent/trunk/modules/consent/templates/index-agreement-created.html (rev 0) +++ XoopsModules/consent/trunk/modules/consent/templates/index-agreement-created.html 2017-08-23 20:06:29 UTC (rev 13276) @@ -0,0 +1,16 @@ +<h1><{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_H1}> #<{$agreement.referee}></h1> +<p><{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_P1}></p> +<h2><{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_H2_GUARDIAN}></h2> +<p><{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_P1_GUARDIAN}></p> +<p style="margin-left: 55px; font-size: 1.8444em; font-weight: 600; margin-top: 15px; margin-bottom: 9px;"> + <{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_GUARDIANNAME}>: <{$guardian.name}><br /> + <{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_GUARDIANEMAIL}>: <{$guardian.email}><br /> + <{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_GUARDIANPHONE}>: <{$guardian.phone}> +</p> +<h2><{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_H2_CLIENTEL}></h2> +<p><{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_P1_CLIENTEL}></p> +<p style="margin-left: 55px; font-size: 1.8444em; font-weight: 600; margin-top: 15px; margin-bottom: 9px;"> + <{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_CLIENTELNAME}>: <{$clientel.name}><br /> + <{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_CLIENTELEMAIL}>: <{$clientel.email}><br /> + <{$smarty.const._MN_CONSENT_INDEX_AGREEMENT_CREATED_CLIENTELPHONE}>: <{$clientel.phone}> +</p> \ No newline at end of file Added: XoopsModules/consent/trunk/modules/consent/templates/index-subscribe-consent.html =================================================================== --- XoopsModules/consent/trunk/modules/consent/templates/index-subscribe-consent.html (rev 0) +++ XoopsModules/consent/trunk/modules/consent/templates/index-subscribe-consent.html 2017-08-23 20:06:29 UTC (rev 13276) @@ -0,0 +1,16 @@ +<h1><{$smarty.const._MN_CONSENT_INDEX_H1}></h1> +<p><{$smarty.const._MN_CONSENT_INDEX_P1}></p> +<{if $errors}> +<h2><{$smarty.const._MN_CONSENT_INDEX_H2}></h2> +<p style="color: rgb(190,0,0); font-size: 1.2345em; font-weight: bold; padding-left: 65px; padding-right: 65px;"> + <ol> + <{foreach item=error from=$errors}> + <li><{$error}></li> + <{/foreach}> + </ol> +</p> +<{/if}> +<p style="color: rgb(0,0,0); font-size: 1.3456em; padding-left: 65px; padding-right: 65px;"> + <{$form}> +</p> +<p><{$smarty.const._MN_CONSENT_INDEX_P2}></p> \ No newline at end of file Modified: XoopsModules/consent/trunk/modules/consent/templates/pdf/clientel-consent.html =================================================================== --- XoopsModules/consent/trunk/modules/consent/templates/pdf/clientel-consent.html 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/templates/pdf/clientel-consent.html 2017-08-23 20:06:29 UTC (rev 13276) @@ -3,7 +3,7 @@ Agreement Referee: <strong>#<{$agreement.referee}></strong></p> <br /> <br /> -<p style="float: right; width: 77%; font-style: italic; font-size: 0.78em; margin-right: 39px;"><font style="font-size: 1.8444em; color: rgb(190,0,0);"><strong>Notice:</strong><br /></font>This form is a legal contract that fit into none disclosure we will never place this contract unless needed in legal waiver into the public spectrum or media, it is stored in a private location after photograph with at least a 3 mega-pixel camera or scanned it at a high resolution and either upload to the following URL: <a href="<{$agreement.upload.url.clientel}>"><{$agreement.upload.url.clientel}></a> or reply to the email containing this file making the subject line quoting the following reference text '#<{$agreement.referee}>', only from the email address of: <{$clientel.email}> to the email address of <{$agreement.email}>.</p> +<p style="float: right; width: 77%; font-style: italic; font-size: 0.78em; margin-right: 39px;"><font style="font-size: 1.8444em; color: rgb(190,0,0);"><strong>Notice:</strong><br /></font>This form is a legal contract that fit into none disclosure we will never place this contract unless needed in legal waiver into the public spectrum or media, it is stored in a private location after photograph with at least a 3 mega-pixel camera or scanned it at a high resolution and either upload to the following URL: <a href="<{$agreement.upload.url.clientel}>"><{$agreement.upload.url.clientel}></a> or reply to the email containing this file making the subject line quoting the following reference text '#<{$agreement.referee}>', only from the email address of: <{$clientel.email}> to the email address of <{$agreement.email-email-from}>.</p> <br /> <br /> <p>I, <em><{$clientel.name}></em> am the participant adult activities that require guardian consent and have the consent of my guardian: <strong><{$guardian.name}></strong> who’s phone number is <{$guardian.phone}> and email address corresponds with <{$guardian.email}>. I understand my legal responsibilities as a participant and realise this permission consent Form is for myself potentially a young adult as mentioned above to participant in adult education or activities sometime with classes, training and workshops with the facility provider.</p> Modified: XoopsModules/consent/trunk/modules/consent/templates/pdf/guardian-consent.html =================================================================== --- XoopsModules/consent/trunk/modules/consent/templates/pdf/guardian-consent.html 2017-08-23 16:11:38 UTC (rev 13275) +++ XoopsModules/consent/trunk/modules/consent/templates/pdf/guardian-consent.html 2017-08-23 20:06:29 UTC (rev 13276) @@ -3,7 +3,7 @@ Agreement Referee: <strong>#<{$agreement.referee}></strong></p> <br /> <br /> -<p style="float: right; width: 77%; font-style: italic; font-size: 0.78em; margin-right: 39px;"><font style="font-size: 1.8444em; color: rgb(190,0,0);"><strong>Notice:</strong><br /></font>This form is a legal contract that fit into none disclosure we will never place this contract unless needed in legal waiver into the public spectrum or media, it is stored in a private location after photograph with at least a 3 mega-pixel camera or scanned it at a high resolution and either upload to the following URL: <a href="<{$agreement.upload.url.guardian}>"><{$agreement.upload.url.guardian}></a> or reply to the email containing this file making the subject line quoting the following reference text '#<{$agreement.referee}>', only from the email address of: <{$guardian.email}> to the email address of <{$agreement.email}>.</p> +<p style="float: right; width: 77%; font-style: italic; font-size: 0.78em; margin-right: 39px;"><font style="font-size: 1.8444em; color: rgb(190,0,0);"><strong>Notice:</strong><br /></font>This form is a legal contract that fit into none disclosure we will never place this contract unless needed in legal waiver into the public spectrum or media, it is stored in a private location after photograph with at least a 3 mega-pixel camera or scanned it at a high resolution and either upload to the following URL: <a href="<{$agreement.upload.url.guardian}>"><{$agreement.upload.url.guardian}></a> or reply to the email containing this file making the subject line quoting the following reference text '#<{$agreement.referee}>', only from the email address of: <{$guardian.email}> to the email address of <{$agreement.email-email-from}>.</p> <br /> <br /> <p>I, <em><{$guardian.name}></em> am the legal gardian of <strong><{$clientel.name}></strong> who’s phone number is <{$clientel.phone}> and email address corresponds with <{$clientel.email}>, I understand my legal responsibilities as a gardian and realise this permission Consent Form is for this young individual as mentioned above to participate in adult education and adult related topic pertaining to this service as well as adult training and workshops with the facility provider.</p> Added: XoopsModules/consent/trunk/modules/consent/wizard.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/wizard.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent... [truncated message content] |
From: <wis...@us...> - 2017-08-23 16:11:42
|
Revision: 13275 http://sourceforge.net/p/xoops/svn/13275 Author: wishcraft Date: 2017-08-23 16:11:38 +0000 (Wed, 23 Aug 2017) Log Message: ----------- Cleaning up errors in SQL and defintions! Added Paths: ----------- XoopsModules/consent/trunk/modules/consent/ XoopsModules/consent/trunk/modules/consent/admin/ XoopsModules/consent/trunk/modules/consent/admin/index.html XoopsModules/consent/trunk/modules/consent/class/ XoopsModules/consent/trunk/modules/consent/class/WideImage/ XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/ XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Image.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/ XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/BMP.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/GD.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/GD2.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/GIF.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/JPEG.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/PNG.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Mapper/TGA.php XoopsModules/consent/trunk/modules/consent/class/WideImage/MapperFactory.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/AddNoise.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ApplyConvolution.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ApplyFilter.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ApplyMask.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/AsGrayscale.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/AsNegative.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/AutoCrop.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/CopyChannelsPalette.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/CopyChannelsTrueColor.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/CorrectGamma.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Crop.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Flip.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/GetMask.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Merge.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Mirror.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Resize.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/ResizeCanvas.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Rotate.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/RoundCorners.php XoopsModules/consent/trunk/modules/consent/class/WideImage/Operation/Unsharp.php XoopsModules/consent/trunk/modules/consent/class/WideImage/OperationFactory.php XoopsModules/consent/trunk/modules/consent/class/WideImage/PaletteImage.php XoopsModules/consent/trunk/modules/consent/class/WideImage/README XoopsModules/consent/trunk/modules/consent/class/WideImage/TrueColorImage.php XoopsModules/consent/trunk/modules/consent/class/WideImage/VERSION XoopsModules/consent/trunk/modules/consent/class/WideImage/WideImage.php XoopsModules/consent/trunk/modules/consent/class/WideImage/gpl.txt XoopsModules/consent/trunk/modules/consent/class/WideImage/index.html XoopsModules/consent/trunk/modules/consent/class/WideImage/lgpl.txt XoopsModules/consent/trunk/modules/consent/class/WideImage/vendor/ XoopsModules/consent/trunk/modules/consent/class/WideImage/vendor/de77/ XoopsModules/consent/trunk/modules/consent/class/WideImage/vendor/de77/BMP.php XoopsModules/consent/trunk/modules/consent/class/WideImage/vendor/de77/TGA.php XoopsModules/consent/trunk/modules/consent/class/agreements.php XoopsModules/consent/trunk/modules/consent/class/batches.php XoopsModules/consent/trunk/modules/consent/class/callbacks.php XoopsModules/consent/trunk/modules/consent/class/clientel.php XoopsModules/consent/trunk/modules/consent/class/emails.php XoopsModules/consent/trunk/modules/consent/class/guardians.php XoopsModules/consent/trunk/modules/consent/class/index.html XoopsModules/consent/trunk/modules/consent/class/mailboxs/ XoopsModules/consent/trunk/modules/consent/class/mailboxs/api.php XoopsModules/consent/trunk/modules/consent/class/mailboxs/imap.php XoopsModules/consent/trunk/modules/consent/class/mailboxs.php XoopsModules/consent/trunk/modules/consent/class/mimetypes.php XoopsModules/consent/trunk/modules/consent/class/objects.php XoopsModules/consent/trunk/modules/consent/class/statistics.php XoopsModules/consent/trunk/modules/consent/class/xcp/ XoopsModules/consent/trunk/modules/consent/class/xcp/XCP-Logo.eps XoopsModules/consent/trunk/modules/consent/class/xcp/XCP-Logo.png XoopsModules/consent/trunk/modules/consent/class/xcp/XCP-Logo.psd XoopsModules/consent/trunk/modules/consent/class/xcp/XCP-Logo.xcf XoopsModules/consent/trunk/modules/consent/class/xcp/class/ XoopsModules/consent/trunk/modules/consent/class/xcp/class/xcp.base.php XoopsModules/consent/trunk/modules/consent/class/xcp/class/xcp.class.php XoopsModules/consent/trunk/modules/consent/class/xcp/class/xcp.enumerator.php XoopsModules/consent/trunk/modules/consent/class/xcp/class/xcp.leaver.php XoopsModules/consent/trunk/modules/consent/class/xcp/debug_base.php XoopsModules/consent/trunk/modules/consent/class/xcp/debug_enumerator.php XoopsModules/consent/trunk/modules/consent/class/xcp/debug_leaver.php XoopsModules/consent/trunk/modules/consent/class/xcp/index.php XoopsModules/consent/trunk/modules/consent/crons/ XoopsModules/consent/trunk/modules/consent/crons/index.html XoopsModules/consent/trunk/modules/consent/header.php XoopsModules/consent/trunk/modules/consent/images/ XoopsModules/consent/trunk/modules/consent/images/1x1.png XoopsModules/consent/trunk/modules/consent/images/index.html XoopsModules/consent/trunk/modules/consent/include/ XoopsModules/consent/trunk/modules/consent/include/data/ XoopsModules/consent/trunk/modules/consent/include/data/batch-csv-template.ods XoopsModules/consent/trunk/modules/consent/include/data/batch-csv-template.xlsx XoopsModules/consent/trunk/modules/consent/include/data/index.html XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-archives.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-audio.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-general.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-images.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-video.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/ XoopsModules/consent/trunk/modules/consent/include/enumerators/approval__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/approval__emails.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/attachments__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/collect__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/day-name__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-agreement-type__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-agreement-type__batches.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-recovery-type__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-target__emails.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-type__emails.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/images__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/index.html XoopsModules/consent/trunk/modules/consent/include/enumerators/method__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/response-sourced__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/response-waiting__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/segment-hour__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/segment-minute__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/segment-month__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/signature__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/ssl__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/type__batches.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/wammy__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/functions.php XoopsModules/consent/trunk/modules/consent/include/index.html XoopsModules/consent/trunk/modules/consent/language/ XoopsModules/consent/trunk/modules/consent/language/english/ XoopsModules/consent/trunk/modules/consent/language/english/errors.php XoopsModules/consent/trunk/modules/consent/language/english/index.html XoopsModules/consent/trunk/modules/consent/language/english/mail_templates/ XoopsModules/consent/trunk/modules/consent/language/english/mail_templates/index.html XoopsModules/consent/trunk/modules/consent/language/english/modinfo.php XoopsModules/consent/trunk/modules/consent/language/english/style.css XoopsModules/consent/trunk/modules/consent/language/index.html XoopsModules/consent/trunk/modules/consent/sql/ XoopsModules/consent/trunk/modules/consent/sql/index.html XoopsModules/consent/trunk/modules/consent/sql/mysqli.sql XoopsModules/consent/trunk/modules/consent/sql/tables.diz XoopsModules/consent/trunk/modules/consent/templates/ XoopsModules/consent/trunk/modules/consent/templates/admin/ XoopsModules/consent/trunk/modules/consent/templates/admin/index.html XoopsModules/consent/trunk/modules/consent/templates/index.html XoopsModules/consent/trunk/modules/consent/templates/pdf/ XoopsModules/consent/trunk/modules/consent/templates/pdf/additional-consent.html XoopsModules/consent/trunk/modules/consent/templates/pdf/clientel-consent.html XoopsModules/consent/trunk/modules/consent/templates/pdf/guardian-consent.html XoopsModules/consent/trunk/modules/consent/templates/pdf/index.html XoopsModules/consent/trunk/modules/consent/upload.php XoopsModules/consent/trunk/modules/consent/xoops_version.php Removed Paths: ------------- XoopsModules/consent/trunk/modules/consent/ Added: XoopsModules/consent/trunk/modules/consent/admin/index.html =================================================================== --- XoopsModules/consent/trunk/modules/consent/admin/index.html (rev 0) +++ XoopsModules/consent/trunk/modules/consent/admin/index.html 2017-08-23 16:11:38 UTC (rev 13275) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsModules/consent/trunk/modules/consent/admin/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php 2017-08-23 16:11:38 UTC (rev 13275) @@ -0,0 +1,167 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * @package Exceptions + */ + class WideImage_NoFontException extends WideImage_Exception {} + + /** + * @package Exceptions + */ + class WideImage_InvalidFontFileException extends WideImage_Exception {} + + /** + * @package Exceptions + */ + class WideImage_InvalidCanvasMethodException extends WideImage_Exception {} + + /** + * @package WideImage + */ + class WideImage_Canvas + { + protected $handle = 0; + protected $image = null; + protected $font = null; + + /** + * Creates a canvas object that writes to the image passed as a parameter + * + * Shouldn't be used directly, use WideImage_Image::getCanvas() instead. + * + * @param WideImage_Image $img Image object + */ + function __construct($img) + { + $this->handle = $img->getHandle(); + $this->image = $img; + } + + /** + * Sets the active font. Can be an instance of + * WideImage_Font_TTF, WideImage_Font_PS, or WideImage_Font_GDF. + * + * + * + * + * @param object $font Font object to set for writeText() + */ + function setFont($font) + { + $this->font = $font; + } + + /** + * Creates and sets the current font + * + * The supported font types are: TTF/OTF, PS, and GDF. + * Font type is detected from the extension. If the $file parameter doesn't have an extension, TTF font is presumed. + * + * Note: not all parameters are supported by all fonts. + * + * @param string $file Font file name (string) + * @param int $size Font size (supported for TTF/OTF and PS fonts, ignored for GDF) + * @param int $color Text color + * @param int $bgcolor Background color (supported only for PS font, ignored for TTF and PS) + * @return mixed One of the WideImage_Font_* objects + */ + function useFont($file, $size = 12, $color = 0, $bgcolor = null) + { + $p = strrpos($file, '.'); + if ($p === false || $p < strlen($file) - 4) + $ext = 'ttf'; + else + $ext = strtolower(substr($file, $p + 1)); + + if ($ext == 'ttf' || $ext == 'otf') + $font = new WideImage_Font_TTF($file, $size, $color); + elseif ($ext == 'ps') + $font = new WideImage_Font_PS($file, $size, $color, $bgcolor); + elseif ($ext == 'gdf') + $font = new WideImage_Font_GDF($file, $color); + else + throw new WideImage_InvalidFontFileException("'$file' appears to be an invalid font file."); + + $this->setFont($font); + return $font; + } + + /** + * Write text on the image at specified position + * + * You must set a font with a call to WideImage_Canvas::setFont() prior to writing text to the image. + * + * Smart coordinates are supported for $x and $y arguments, but currently only for TTF/OTF fonts. + * + * Example: + * <code> + * $img = WideImage::load('pic.jpg'); + * $canvas = $img->getCanvas(); + * $canvas->useFont('Verdana.ttf', 16, $img->allocateColor(255, 0, 0)); + * $canvas->writeText('right', 'bottom', 'www.website.com'); + * </code> + * + * @param int $x Left + * @param int $y Top + * @param string $text Text to write + * @param int $angle The angle, defaults to 0 + */ + function writeText($x, $y, $text, $angle = 0) + { + if ($this->font === null) + throw new WideImage_NoFontException("Can't write text without a font."); + + $angle = - floatval($angle); + if ($angle < 0) + $angle = 360 + $angle; + $angle = $angle % 360; + + $this->font->writeText($this->image, $x, $y, $text, $angle); + } + + /** + * A magic method that allows you to call any PHP function that starts with "image". + * + * This is a shortcut to call custom functions on the image handle. + * + * Example: + * <code> + * $img = WideImage::load('pic.jpg'); + * $canvas = $img->getCanvas(); + * $canvas->filledRect(10, 10, 20, 30, $img->allocateColor(0, 0, 0)); + * $canvas->line(60, 80, 30, 100, $img->allocateColor(255, 0, 0)); + * </code> + */ + function __call($method, $params) + { + if (function_exists('image' . $method)) + { + array_unshift($params, $this->handle); + call_user_func_array('image' . $method, $params); + } + else + throw new WideImage_InvalidCanvasMethodException("Function doesn't exist: image{$method}."); + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Canvas.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php 2017-08-23 16:11:38 UTC (rev 13275) @@ -0,0 +1,208 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package Internals + **/ + + + /** + * @package Exceptions + */ + class WideImage_InvalidCoordinateException extends WideImage_Exception {} + + /** + * A utility class for smart coordinates + * + * @package Internals + **/ + class WideImage_Coordinate + { + static protected $coord_align = array("left", "center", "right", "top", "middle", "bottom"); + static protected $coord_numeric = array("[0-9]+", "[0-9]+\.[0-9]+", "[0-9]+%", "[0-9]+\.[0-9]+%"); + + /** + * Parses a numeric or string representation of a corrdinate into a structure + * + * @param string $coord Smart coordinate + * @return array Parsed smart coordinate + */ + static function parse($c) + { + $tokens = array(); + $operators = array('+', '-'); + + $flush_operand = false; + $flush_operator = false; + $current_operand = ''; + $current_operator = ''; + $coordinate = strval($c); + $expr_len = strlen($coordinate); + + for ($i = 0; $i < $expr_len; $i++) + { + $char = $coordinate[$i]; + + if (in_array($char, $operators)) + { + $flush_operand = true; + $flush_operator = true; + $current_operator = $char; + } + else + { + $current_operand .= $char; + if ($i == $expr_len - 1) + $flush_operand = true; + } + + if ($flush_operand) + { + if (trim($current_operand) != '') + $tokens[] = array('type' => 'operand', 'value' => trim($current_operand)); + + $current_operand = ''; + $flush_operand = false; + } + + if ($flush_operator) + { + $tokens[] = array('type' => 'operator', 'value' => $char); + $flush_operator = false; + } + } + return $tokens; + } + + /** + * Evaluates the $coord relatively to $dim + * + * @param string $coord A numeric value or percent string + * @param int $dim Dimension + * @param int $sec_dim Secondary dimension (for align) + * @return int Calculated value + */ + static function evaluate($coord, $dim, $sec_dim = null) + { + $comp_regex = implode('|', self::$coord_align) . '|' . implode('|', self::$coord_numeric); + if (preg_match("/^([+-])?({$comp_regex})$/", $coord, $matches)) + { + $sign = intval($matches[1] . "1"); + $val = $matches[2]; + if (in_array($val, self::$coord_align)) + { + if ($sec_dim === null) + { + switch ($val) + { + case 'left': + case 'top': + return 0; + break; + case 'center': + case 'middle': + return $sign * intval($dim / 2); + break; + case 'right': + case 'bottom': + return $sign * $dim; + break; + default: + return null; + } + } + else + { + switch ($val) + { + case 'left': + case 'top': + return 0; + break; + case 'center': + case 'middle': + return $sign * intval($dim / 2 - $sec_dim / 2); + break; + case 'right': + case 'bottom': + return $sign * ($dim - $sec_dim); + break; + default: + return null; + } + } + } + elseif (substr($val, -1) === '%') + return intval(round($sign * $dim * floatval(str_replace('%', '', $val)) / 100)); + else + return $sign * intval(round($val)); + } + } + + /** + * Calculates and fixes a smart coordinate into a numeric value + * + * @param mixed $value Smart coordinate, relative to $dim + * @param int $dim Coordinate to which $value is relative + * @param int $sec_dim Secondary dimension (for align) + * @return int Calculated value + */ + static function fix($value, $dim, $sec_dim = null) + { + $coord_tokens = self::parse($value); + + if (count($coord_tokens) == 0 || $coord_tokens[count($coord_tokens) - 1]['type'] != 'operand') + throw new WideImage_InvalidCoordinateException("Couldn't parse coordinate '$value' properly."); + + $value = 0; + $operation = 1; + foreach ($coord_tokens as $token) + { + if ($token['type'] == 'operand') + { + $operand_value = self::evaluate($token['value'], $dim, $sec_dim); + if ($operation == 1) + $value = $value + $operand_value; + elseif ($operation == -1) + $value = $value - $operand_value; + else + throw new WideImage_InvalidCoordinateException("Invalid coordinate syntax."); + + $operation = 0; + } + elseif ($token['type'] == 'operator') + { + if ($token['value'] == '-') + { + if ($operation == 0) + $operation = -1; + else + $operation = $operation * -1; + } + elseif ($token['value'] == '+') + { + if ($operation == 0) + $operation = '1'; + } + } + } + return $value; + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Coordinate.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php 2017-08-23 16:11:38 UTC (rev 13275) @@ -0,0 +1,31 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * Base Exception class + * + * @package Exceptions + **/ + class WideImage_Exception extends RuntimeException {} + \ No newline at end of file Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Exception.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php 2017-08-23 16:11:38 UTC (rev 13275) @@ -0,0 +1,48 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * GDF font support class + * + * @package WideImage + */ + class WideImage_Font_GDF + { + protected $font; + protected $color; + + function __construct($face, $color) + { + if (is_int($face) && $face >= 1 && $face <= 5) + $this->font = $face; + else + $this->font = imageloadfont($face); + $this->color = $color; + } + + function writeText($image, $x, $y, $text) + { + imagestring($image->getHandle(), $this->font, $x, $y, $text, $this->color); + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/GDF.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php 2017-08-23 16:11:38 UTC (rev 13275) @@ -0,0 +1,60 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * PS font support class + * + * @package WideImage + */ + class WideImage_Font_PS + { + public $size; + public $color; + public $handle; + + function __construct($file, $size, $color, $bgcolor = null) + { + $this->handle = imagepsloadfont($file); + $this->size = $size; + $this->color = $color; + if ($bgcolor === null) + $this->bgcolor = $color; + else + $this->color = $color; + } + + function writeText($image, $x, $y, $text, $angle = 0) + { + if ($image->isTrueColor()) + $image->alphaBlending(true); + + imagepstext($image->getHandle(), $text, $this->handle, $this->size, $this->color, $this->bgcolor, $x, $y, 0, 0, $angle, 4); + } + + function __destruct() + { + imagepsfreefont($this->handle); + $this->handle = null; + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/PS.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php 2017-08-23 16:11:38 UTC (rev 13275) @@ -0,0 +1,75 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * TTF font support class + * + * @package WideImage + */ + class WideImage_Font_TTF + { + public $face; + public $size; + public $color; + + function __construct($face, $size, $color) + { + $this->face = $face; + $this->size = $size; + $this->color = $color; + } + + /** + * Writes text onto an image + * + * @param WideImage_Image $image + * @param mixed $x smart coordinate + * @param mixed $y smart coordinate + * @param string $text + * @param int $angle Angle in degrees clockwise + */ + function writeText($image, $x, $y, $text, $angle = 0) + { + if ($image->isTrueColor()) + $image->alphaBlending(true); + + $box = imageftbbox($this->size, $angle, $this->face, $text); + $obox = array( + 'left' => min($box[0], $box[2], $box[4], $box[6]), + 'top' => min($box[1], $box[3], $box[5], $box[7]), + 'right' => max($box[0], $box[2], $box[4], $box[6]) - 1, + 'bottom' => max($box[1], $box[3], $box[5], $box[7]) - 1 + ); + $obox['width'] = abs($obox['left']) + abs($obox['right']); + $obox['height'] = abs($obox['top']) + abs($obox['bottom']); + + $x = WideImage_Coordinate::fix($x, $image->getWidth(), $obox['width']); + $y = WideImage_Coordinate::fix($y, $image->getHeight(), $obox['height']); + + $fixed_x = $x - $obox['left']; + $fixed_y = $y - $obox['top']; + + imagettftext($image->getHandle(), $this->size, $angle, $fixed_x, $fixed_y, $this->color, $this->face, $text); + } + } Property changes on: XoopsModules/consent/trunk/modules/consent/class/WideImage/Font/TTF.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/WideImage/Image.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/WideImage/Image.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/WideImage/Image.php 2017-08-23 16:11:38 UTC (rev 13275) @@ -0,0 +1,964 @@ +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * Thrown when an invalid dimension is passed for some operations + * + * @package Exceptions + */ + class WideImage_InvalidImageDimensionException extends WideImage_Exception {} + + /** + * Thrown when an image can't be saved (returns false by the mapper) + * + * @package Exceptions + */ + class WideImage_UnknownErrorWhileMappingException extends WideImage_Exception {} + + /** + * Base class for images + * + * @package WideImage + */ + abstract class WideImage_Image + { + /** + * Holds the image resource + * @var resource + */ + protected $handle = null; + + /** + * Flag that determines if WideImage should call imagedestroy() upon object destruction + * @var bool + */ + protected $handleReleased = false; + + /** + * Canvas object + * @var WideImage_Canvas + */ + protected $canvas = null; + + /** + * @var string + */ + protected $sdata = null; + + /** + * The base class constructor + * + * @param resource $handle Image handle (GD2 resource) + */ + function __construct($handle) + { + WideImage::assertValidImageHandle($handle); + $this->handle = $handle; + } + + /** + * Cleanup + * + * Destroys the handle via WideImage_Image::destroy() when called by the GC. + */ + function __destruct() + { + $this->destroy(); + } + + /** + * This method destroy the image handle, and releases the image resource. + * + * After this is called, the object doesn't hold a valid image any more. + * No operation should be called after that. + */ + function destroy() + { + if ($this->isValid() && !$this->handleReleased) + imagedestroy($this->handle); + + $this->handle = null; + } + + /** + * Returns the GD image resource + * + * @return resource GD image resource + */ + function getHandle() + { + return $this->handle; + } + + /** + * @return bool True, if the image object holds a valid GD image, false otherwise + */ + function isValid() + { + return WideImage::isValidImageHandle($this->handle); + } + + /** + * Releases the handle + */ + function releaseHandle() + { + $this->handleReleased = true; + } + + /** + * Saves an image to a file + * + * The file type is recognized from the $uri. If you save to a GIF8, truecolor images + * are automatically converted to palette. + * + * This method supports additional parameters: quality (for jpeg images) and + * compression quality and filters (for png images). See http://www.php.net/imagejpeg and + * http://www.php.net/imagepng for details. + * + * Examples: + * <code> + * // save to a GIF + * $image->saveToFile('image.gif'); + * + * // save to a PNG with compression=7 and no filters + * $image->saveToFile('image.png', 7, PNG_NO_FILTER); + * + * // save to a JPEG with quality=80 + * $image->saveToFile('image.jpg', 80); + * + * // save to a JPEG with default quality=100 + * $image->saveToFile('image.jpg'); + * </code> + * + * @param string $uri File location + */ + function saveToFile($uri) + { + $mapper = WideImage_MapperFactory::selectMapper($uri, null); + $args = func_get_args(); + array_unshift($args, $this->getHandle()); + $res = call_user_func_array(array($mapper, 'save'), $args); + if (!$res) + throw new WideImage_UnknownErrorWhileMappingException(get_class($mapper) . " returned an invalid result while saving to $uri"); + } + + /** + * Returns binary string with image data in format specified by $format + * + * Additional parameters may be passed to the function. See WideImage_Image::saveToFile() for more details. + * + * @param string $format The format of the image + * @return string The binary image data in specified format + */ + function asString($format) + { + ob_start(); + $args = func_get_args(); + $args[0] = null; + array_unshift($args, $this->getHandle()); + + $mapper = WideImage_MapperFactory::selectMapper(null, $format); + $res = call_user_func_array(array($mapper, 'save'), $args); + if (!$res) + throw new WideImage_UnknownErrorWhileMappingException(get_class($mapper) . " returned an invalid result while writing the image data"); + + return ob_get_clean(); + } + + /** + * Output a header to browser. + * + * @param $name Name of the header + * @param $data Data + */ + protected function writeHeader($name, $data) + { + header($name . ": " . $data); + } + + /** + * Outputs the image to browser + * + * Sets headers Content-length and Content-type, and echoes the image in the specified format. + * All other headers (such as Content-disposition) must be added manually. + * + * Example: + * <code> + * WideImage::load('image1.png')->resize(100, 100)->output('gif'); + * </code> + * + * @param string $format Image format + */ + function output($format) + { + $args = func_get_args(); + $data = call_user_func_array(array($this, 'asString'), $args); + + $this->writeHeader('Content-length', strlen($data)); + $this->writeHeader('Content-type', WideImage_MapperFactory::mimeType($format)); + echo $data; + } + + /** + * @return int Image width + */ + function getWidth() + { + return imagesx($this->handle); + } + + /** + * @return int Image height + */ + function getHeight() + { + return imagesy($this->handle); + } + + /** + * Allocate a color by RGB values. + * + * @param mixed $R Red-component value or an RGB array (with red, green, blue keys) + * @param int $G If $R is int, this is the green component + * @param int $B If $R is int, this is the blue component + * @return int Image color index + */ + function allocateColor($R, $G = null, $B = null) + { + if (is_array($R)) + return imageColorAllocate($this->handle, $R['red'], $R['green'], $R['blue']); + else + return imageColorAllocate($this->handle, $R, $G, $B); + } + + /** + * @return bool True if the image is transparent, false otherwise + */ + function isTransparent() + { + return $this->getTransparentColor() >= 0; + } + + /** + * @return int Transparent color index + */ + function getTransparentColor() + { + return imagecolortransparent($this->handle); + } + + /** + * Sets the current transparent color index. Only makes sense for palette images (8-bit). + * + * @param int $color Transparent color index + */ + function setTransparentColor($color) + { + return imagecolortransparent($this->handle, $color); + } + + /** + * Returns a RGB array of the transparent color or null if none. + * + * @return mixed Transparent color RGBA array + */ + function getTransparentColorRGB() + { + $total = imagecolorstotal($this->handle); + $tc = $this->getTransparentColor(); + + if ($tc >= $total && $total > 0) + return null; + else + return $this->getColorRGB($tc); + } + + /** + * Returns a RGBA array for pixel at $x, $y + * + * @param int $x + * @param int $y + * @return array RGB array + */ + function getRGBAt($x, $y) + { + return $this->getColorRGB($this->getColorAt($x, $y)); + } + + /** + * Writes a pixel at the designated coordinates + * + * Takes an associative array of colours and uses getExactColor() to + * retrieve the exact index color to write to the image with. + * + * @param int $x + * @param int $y + * @param array $color + */ + function setRGBAt($x, $y, $color) + { + $this->setColorAt($x, $y, $this->getExactColor($color)); + } + + /** + * Returns a color's RGB + * + * @param int $colorIndex Color index + * @return mixed RGBA array for a color with index $colorIndex + */ + function getColorRGB($colorIndex) + { + return imageColorsForIndex($this->handle, $colorIndex); + } + + /** + * Returns an index of the color at $x, $y + * + * @param int $x + * @param int $y + * @return int Color index for a pixel at $x, $y + */ + function getColorAt($x, $y) + { + return imagecolorat($this->handle, $x, $y); + } + + /** + * Set the color index $color to a pixel at $x, $y + * + * @param int $x + * @param int $y + * @param int $color Color index + */ + function setColorAt($x, $y, $color) + { + return imagesetpixel($this->handle, $x, $y, $color); + } + + /** + * Returns closest color index that matches the given RGB value. Uses + * PHP's imagecolorclosest() + * + * @param mixed $R Red or RGBA array + * @param int $G Green component (or null if $R is an RGB array) + * @param int $B Blue component (or null if $R is an RGB array) + * @return int Color index + */ + function getClosestColor($R, $G = null, $B = null) + { + if (is_array($R)) + return imagecolorclosest($this->handle, $R['red'], $R['green'], $R['blue']); + else + return imagecolorclosest($this->handle, $R, $G, $B); + } + + /** + * Returns the color index that exactly matches the given RGB value. Uses + * PHP's imagecolorexact() + * + * @param mixed $R Red or RGBA array + * @param int $G Green component (or null if $R is an RGB array) + * @param int $B Blue component (or null if $R is an RGB array) + * @return int Color index + */ + function getExactColor($R, $G = null, $B = null) + { + if (is_array($R)) + return imagecolorexact($this->handle, $R['red'], $R['green'], $R['blue']); + else + return imagecolorexact($this->handle, $R, $G, $B); + } + + /** + * Copies transparency information from $sourceImage. Optionally fills + * the image with the transparent color at (0, 0). + * + * @param object $sourceImage + * @param bool $fill True if you want to fill the image with transparent color + */ + function copyTransparencyFrom($sourceImage, $fill = true) + { + if ($sourceImage->isTransparent()) + { + $rgba = $sourceImage->getTransparentColorRGB(); + if ($rgba === null) + return; + + if ($this->isTrueColor()) + { + $rgba['alpha'] = 127; + $color = $this->allocateColorAlpha($rgba); + } + else + $color = $this->allocateColor($rgba); + + $this->setTransparentColor($color); + if ($fill) + $this->fill(0, 0, $color); + } + } + + /** + * Fill the image at ($x, $y) with color index $color + * + * @param int $x + * @param int $y + * @param int $color + */ + function fill($x, $y, $color) + { + return imagefill($this->handle, $x, $y, $color); + } + + /** + * Used internally to create Operation objects + * + * @param string $name + * @return object + */ + protected function getOperation($name) + { + return WideImage_OperationFactory::get($name); + } + + /** + * Returns the image's mask + * + * Mask is a greyscale image where the shade defines the alpha channel (black = transparent, white = opaque). + * + * For opaque images (JPEG), the result will be white. For images with single-color transparency (GIF, 8-bit PNG), + * the areas with the transparent color will be black. For images with alpha channel transparenct, + * the result will be alpha channel. + * + * @return WideImage_Image An image mask + **/ + function getMask() + { + return $this->getOperation('GetMask')->execute($this); + } + + /** + * Resize the image to given dimensions. + * + * $width and $height are both smart coordinates. This means that you can pass any of these values in: + * - positive or negative integer (100, -20, ...) + * - positive or negative percent string (30%, -15%, ...) + * - complex coordinate (50% - 20, 15 + 30%, ...) + * + * If $width is null, it's calculated proportionally from $height, and vice versa. + * + * Example (resize to half-size): + * <code> + * $smaller = $image->resize('50%'); + * + * $smaller = $image->resize('100', '100', 'inside', 'down'); + * is the same as + * $smaller = $image->resizeDown(100, 100, 'inside'); + * </code> + * + * @param mixed $width The new width (smart coordinate), or null. + * @param mixed $height The new height (smart coordinate), or null. + * @param string $fit 'inside', 'outside', 'fill' + * @param string $scale 'down', 'up', 'any' + * @return WideImage_Image The resized image + */ + function resize($width = null, $height = null, $fit = 'inside', $scale = 'any') + { + return $this->getOperation('Resize')->execute($this, $width, $height, $fit, $scale); + } + + /** + * Same as WideImage_Image::resize(), but the image is only applied if it is larger then the given dimensions. + * Otherwise, the resulting image retains the source's dimensions. + * + * @param int $width New width, smart coordinate + * @param int $height New height, smart coordinate + * @param string $fit 'inside', 'outside', 'fill' + * @return WideImage_Image resized image + */ + function resizeDown($width = null, $height = null, $fit = 'inside') + { + return $this->resize($width, $height, $fit, 'down'); + } + + /** + * Same as WideImage_Image::resize(), but the image is only applied if it is smaller then the given dimensions. + * Otherwise, the resulting image retains the source's dimensions. + * + * @param int $width New width, smart coordinate + * @param int $height New height, smart coordinate + * @param string $fit 'inside', 'outside', 'fill' + * @return WideImage_Image resized image + */ + function resizeUp($width = null, $height = null, $fit = 'inside') + { + return $this->resize($width, $height, $fit, 'up'); + } + + /** + * Rotate the image for angle $angle clockwise. + * + * Preserves transparency. Has issues when saving to a BMP. + * + * @param int $angle Angle in degrees, clock-wise + * @param int $bgColor color of the new background + * @param bool $ignoreTransparent + * @return WideImage_Image The rotated image + */ + function rotate($angle, $bgColor = null, $ignoreTransparent = true) + { + return $this->getOperation('Rotate')->execute($this, $angle, $bgColor, $ignoreTransparent); + } + + /** + * This method lays the overlay (watermark) on the image. + * + * Hint: if the overlay is a truecolor image with alpha channel, you should leave $pct at 100. + * + * This operation supports alignment notation in coordinates: + * <code> + * $watermark = WideImage::load('logo.gif'); + * $base = WideImage::load('picture.jpg'); + * $result = $base->merge($watermark, "right - 10", "bottom - 10", 50); + * // applies a logo aligned to bottom-right corner with a 10 pixel margin + * </code> + * + * @param WideImage_Image $overlay The overlay image + * @param mixed $left Left position of the overlay, smart coordinate + * @param mixed $top Top position of the overlay, smart coordinate + * @param int $pct The opacity of the overlay + * @return WideImage_Image The merged image + */ + function merge($overlay, $left = 0, $top = 0, $pct = 100) + { + return $this->getOperation('Merge')->execute($this, $overlay, $left, $top, $pct); + } + + /** + * Resizes the canvas of the image, but doesn't scale the content of the image + * + * This operation creates an empty canvas with dimensions $width x $height, filled with + * background color $bg_color and draws the original image onto it at position [$pos_x, $pos_y]. + * + * Arguments $width, $height, $pos_x and $pos_y are all smart coordinates. $width and $height are + * relative to the current image size, $pos_x and $pos_y are relative to the newly calculated + * canvas size. This can be confusing, but it makes sense. See the example below. + * + * The example below loads a 100x150 image and then resizes its canvas to 200% x 100%+20 + * (which evaluates to 200x170). The image is placed at position [10, center+20], which evaluates to [10, 30]. + * <code> + * $image = WideImage::load('someimage.jpg'); // 100x150 + * $white = $image->allocateColor(255, 255, 255); + * $image->resizeCanvas('200%', '100% + 20', 10, 'center+20', $white); + * </code> + * + * The parameter $merge defines whether the original image should be merged onto the new canvas. + * This means it blends transparent color and alpha colors into the background color. If set to false, + * the original image is just copied over, preserving the transparency/alpha information. + * + * You can set the $scale parameter to limit when to resize the canvas. For example, if you want + * to resize the canvas only if the image is smaller than the new size, but leave the image intact + * if it's larger, set it to 'up'. Likewise, if you want to shrink the canvas, but don't want to + * change images that are already smaller, set it to 'down'. + * + * @param mixed $width Width of the new canvas (smart coordinate, relative to current image width) + * @param mixed $height Height of the new canvas (smart coordinate, relative to current image height) + * @param mixed $pos_x x-position of the image (smart coordinate, relative to the new width) + * @param mixed $pos_y y-position of the image (smart coordinate, relative to the new height) + * @param int $bg_color Background color (created with allocateColor or allocateColorAlpha), defaults to null (tries to use a transparent color) + * @param string $scale Possible values: 'up' (enlarge only), 'down' (downsize only), 'any' (resize precisely to $width x $height). Defaults to 'any'. + * @param bool $merge Merge the original image (flatten alpha channel and transparency) or copy it over (preserve). Defaults to false. + * @return WideImage_Image The resulting image with resized canvas + */ + function resizeCanvas($width, $height, $pos_x, $pos_y, $bg_color = null, $scale = 'any', $merge = false) + { + return $this->getOperation('ResizeCanvas')->execute($this, $width, $height, $pos_x, $pos_y, $bg_color, $scale, $merge); + } + + /** + * Returns an image with round corners + * + * You can either set the corners' color or set them transparent. + * + * Note on $smoothness: 1 means jagged edges, 2 is much better, more than 4 doesn't noticeably improve the quality. + * Rendering becomes increasingly slower if you increase smoothness. + * + * Example: + * <code> + * $nice = $ugly->roundCorners(20, $ugly->allocateColor(255, 0, 0), 2); + * </code> + * + * Use $corners parameter to specify which corners to draw rounded. Possible values are + * WideImage::SIDE_TOP_LEFT, WideImage::SIDE_TOP, + * WideImage::SIDE_TOP_RIGHT, WideImage::SIDE_RIGHT, + * WideImage::SIDE_BOTTOM_RIGHT, WideImage::SIDE_BOTTOM, + * WideImage::SIDE_BOTTOM_LEFT, WideImage::SIDE_LEFT, and WideImage::SIDE_ALL. + * You can specify any combination of corners with a + operation, see example below. + * + * Example: + * <code> + * $white = $image->allocateColor(255, 255, 255); + * $diagonal_corners = $image->roundCorners(15, $white, 2, WideImage::SIDE_TOP_LEFT + WideImage::SIDE_BOTTOM_RIGHT); + * $right_corners = $image->roundCorners(15, $white, 2, WideImage::SIDE_RIGHT); + * </code> + * + * @param int $radius Radius of the corners + * @param int $color The color of corners. If null, corners are rendered transparent (slower than using a solid color). + * @param int $smoothness Specify the level of smoothness. Suggested values from 1 to 4. + * @param int $corners Specify which corners to draw (defaults to WideImage::SIDE_ALL = all corners) + * @return WideImage_Image The resulting image with round corners + */ + function roundCorners($radius, $color = null, $smoothness = 2, $corners = 255) + { + return $this->getOperation('RoundCorners')->execute($this, $radius, $color, $smoothness, $corners); + } + + /** + * Returns an image with applied mask + * + * A mask is a grayscale image, where the shade determines the alpha channel. Black is fully transparent + * and white is fully opaque. + * + * @param WideImage_Image $mask The mask image, greyscale + * @param mixed $left Left coordinate, smart coordinate + * @param mixed $top Top coordinate, smart coordinate + * @return WideImage_Image The resulting image + **/ + function applyMask($mask, $left = 0, $top = 0) + { + return $this->getOperation('ApplyMask')->execute($this, $mask, $left, $top); + } + + /** + * Applies a filter + * + * @param int $filter One of the IMG_FILTER_* constants + * @param int $arg1 + * @param int $arg2 + * @param int $arg3 + * @param int $arg4 + * @return WideImage_Image + */ + function applyFilter($filter, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null) + { + return $this->getOperation('ApplyFilter')->execute($this, $filter, $arg1, $arg2, $arg3, $arg4); + } + + /** + * Applies convolution matrix with imageconvolution() + * + * @param array $matrix + * @param float $div + * @param float $offset + * @return WideImage_Image + */ + function applyConvolution($matrix, $div, $offset) + { + return $this->getOperation('ApplyConvolution')->execute($this, $matrix, $div, $offset); + } + + /** + * Returns a cropped rectangular portion of the image + * + * If the rectangle specifies area that is out of bounds, it's limited to the current image bounds. + * + * Examples: + * <code> + * $cropped = $img->crop(10, 10, 150, 200); // crops a 150x200 rect at (10, 10) + * $cropped = $img->crop(-100, -50, 100, 50); // crops a 100x50 rect at the right-bottom of the image + * $cropped = $img->crop('25%', '25%', '50%', '50%'); // crops a 50%x50% rect from the center of the image + * </code> + * + * This operation supports alignment notation in left/top coordinates. + * Example: + * <code> + * $cropped = $img->crop("right", "bottom", 100, 200); // crops a 100x200 rect from right bottom + * $cropped = $img->crop("center", "middle", 50, 30); // crops a 50x30 from the center of the image + * </code> + * + * @param mixed $left Left-coordinate of the crop rect, smart coordinate + * @param mixed $top Top-coordinate of the crop rect, smart coordinate + * @param mixed $width Width of the crop rect, smart coordinate + * @param mixed $height Height of the crop rect, smart coordinate + * @return WideImage_Image The cropped image + **/ + function crop($left = 0, $top = 0, $width = '100%', $height = '100%') + { + return $this->getOperation('Crop')->execute($this, $left, $top, $width, $height); + } + + /** + * Performs an auto-crop on the image + * + * The image is auto-cropped from each of four sides. All sides are + * scanned for pixels that differ from $base_color for more than + * $rgb_threshold in absolute RGB difference. If more than $pixel_cutoff + * differentiating pixels are found, that line is considered to be the crop line for the side. + * If the line isn't different enough, the algorithm procedes to the next line + * towards the other edge of the image. + * + * When the crop rectangle is found, it's enlarged by the $margin value on each of the four sides. + * + * @param int $margin Margin for the crop rectangle, can be negative. + * @param int $rgb_threshold RGB difference which still counts as "same color". + * @param int $pixel_cutoff How many pixels need to be different to mark a cut line. + * @param int $base_color The base color index. If none specified (or null given), left-top pixel is used. + * @return WideImage_Image The cropped image + */ + function autoCrop($margin = 0, $rgb_threshold = 0, $pixel_cutoff = 1, $base_color = null) + { + return $this->getOperation('AutoCrop')->execute($this, $margin, $rgb_threshold, $pixel_cutoff, $base_color); + } + + /** + * Returns a negative of the image + * + * This operation differs from calling WideImage_Image::applyFilter(IMG_FILTER_NEGATIVE), because it's 8-bit and transparency safe. + * This means it will return an 8-bit image, if the source image is 8-bit. If that 8-bit image has a palette transparency, + * the resulting image will keep transparency. + * + * @return WideImage_Image negative of the image + */ + function asNegative() + { + return $this->getOperation('AsNegative')->execute($this); + } + + /** + * Returns a grayscale copy of the image + * + * @return WideImage_Image grayscale copy + **/ + function asGrayscale() + { + return $this->getOperation('AsGrayscale')->execute($this); + } + + /** + * Returns a mirrored copy of the image + * + * @return WideImage_Image Mirrored copy + **/ + function mirror() + { + return $this->getOperation('Mirror')->execute($this); + } + + /** + * Applies the unsharp filter + * + * @param float $amount + * @param float $radius + * @param float $threshold + * @return WideImage_Image Unsharpened copy of the image + **/ + function unsharp($amount, $radius, $threshold) + { + return $this->getOperation('Unsharp')->execute($this, $amount, $radius, $threshold); + } + + /** + * Returns a flipped (mirrored over horizontal line) copy of the image + * + * @return WideImage_Image Flipped copy + **/ + function flip() + { + return $this->getOperation('Flip')->execute($this); + } + + /** + * Corrects gamma on the image + * + * @param float $inputGamma + * @param float $outputGamma + * @return WideImage_Image Image with corrected gamma + **/ + function correctGamma($inputGamma, $outputGamma) + { + return $this->getOperation('CorrectGamma')->execute($this, $inputGamma, $outputGamma); + } + + /** + * Adds noise to the image + * + * @author Tomasz Kapusta + * + * @param int $amount Number of noise pixels to add + * @param string $type Type of noise 'salt&pepper', 'color' or 'mono' + * @return WideImage_Image Image with noise added + **/ + function addNoise($amount, $type) + { + return $this->getOperation('AddNoise')->execute($this, $amount, $type); + } + + /** + * Used internally to execute operations + * + * @param string $name + * @param array $args + * @return WideImage_Image + */ + function __call($name, $args) + { + $op = $this->getOperation($name); +... [truncated message content] |
From: <wis...@us...> - 2017-08-23 12:12:29
|
Revision: 13274 http://sourceforge.net/p/xoops/svn/13274 Author: wishcraft Date: 2017-08-23 12:12:25 +0000 (Wed, 23 Aug 2017) Log Message: ----------- Finalise Database and Classes Intial Structure! Modified Paths: -------------- XoopsModules/consent/trunk/modules/consent/class/agreements.php XoopsModules/consent/trunk/modules/consent/class/batches.php XoopsModules/consent/trunk/modules/consent/class/callbacks.php XoopsModules/consent/trunk/modules/consent/class/clientel.php XoopsModules/consent/trunk/modules/consent/class/emails.php XoopsModules/consent/trunk/modules/consent/class/guardians.php XoopsModules/consent/trunk/modules/consent/class/statistics.php XoopsModules/consent/trunk/modules/consent/include/functions.php XoopsModules/consent/trunk/modules/consent/sql/mysql.sql XoopsModules/consent/trunk/modules/consent/sql/tables.diz XoopsModules/consent/trunk/modules/consent/templates/pdf/clientel-consent-grouped.html XoopsModules/consent/trunk/modules/consent/templates/pdf/clientel-consent-individual.html Added Paths: ----------- XoopsModules/consent/trunk/modules/consent/class/mailboxs/ XoopsModules/consent/trunk/modules/consent/class/mailboxs/api.php XoopsModules/consent/trunk/modules/consent/class/mailboxs/imap.php XoopsModules/consent/trunk/modules/consent/class/mailboxs.php XoopsModules/consent/trunk/modules/consent/class/mimetypes.php XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-archives.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-audio.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-general.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-images.diz XoopsModules/consent/trunk/modules/consent/include/data/mimetypes-video.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/approval__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/approval__emails.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/attachments__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/collect__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/day-name__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-agreement-type__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-agreement-type__batches.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-recovery-type__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-target__emails.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/email-type__emails.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/images__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/method__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/response-sourced__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/response-waiting__agreements.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/segment-hour__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/segment-minute__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/segment-month__statistics.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/signature__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/ssl__mailboxs.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/type__batches.diz XoopsModules/consent/trunk/modules/consent/include/enumerators/wammy__mailboxs.diz Modified: XoopsModules/consent/trunk/modules/consent/class/agreements.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/agreements.php 2017-08-19 20:29:28 UTC (rev 13273) +++ XoopsModules/consent/trunk/modules/consent/class/agreements.php 2017-08-23 12:12:25 UTC (rev 13274) @@ -32,6 +32,7 @@ * <code> * CREATE TABLE `consent_agreements` ( * `id` int(32) NOT NULL AUTO_INCREMENT, + * `mailbox-id` int(14) NOT NULL DEFAULT '0', * `uid` int(13) NOT NULL DEFAULT '0', * `approval` enum('Waiting','Approved','Unapproved') NOT NULL DEFAULT 'Waiting', * `batch-id` int(20) NOT NULL DEFAULT '0', @@ -40,7 +41,7 @@ * `hashkey` varchar(12) NOT NULL DEFAULT '', * `referee` varchar(18) NOT NULL DEFAULT '', * `callback-url` varchar(255) NOT NULL DEFAULT '', - * `svn-path` varchar(255) NOT NULL DEFAULT '', + * `svn-paths` longtext, * `gardian-filename-pdf` varchar(128) NOT NULL DEFAULT '', * `clientel-filename-pdf` varchar(128) NOT NULL DEFAULT '', * `gardian-response-file` varchar(128) NOT NULL DEFAULT '', @@ -47,18 +48,19 @@ * `clientel-response-file` varchar(128) NOT NULL DEFAULT '', * `response-waiting` enum('Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', * `response-sourced` enum('Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', - * `response-comment` mediumtext, - * `response-network` mediumtext, + * `response-comment` longtext, + * `response-network` longtext, * `response-notified` int(11) NOT NULL DEFAULT '0', * `response-weight` int(11) NOT NULL DEFAULT '0', * `response-gardian-weight` int(11) NOT NULL DEFAULT '0', * `response-clientel-weight` int(11) NOT NULL DEFAULT '0', - * `email-ids` mediumtext, + * `email-ids` longtext, * `email-agreement-type` enum('None','Gardian','Clientel','Both') NOT NULL DEFAULT 'Both', * `email-recovery-type` enum('None','Gardian','Clientel','Batch') NOT NULL DEFAULT 'None', * `email-recovery-guardian-sent` int(11) NOT NULL DEFAULT '0', * `email-recovery-clientel-sent` int(11) NOT NULL DEFAULT '0', * `email-from` varchar(64) NOT NULL DEFAULT '', + * `email-email-from` varchar(196) NOT NULL DEFAULT '', * `email-sent` int(11) NOT NULL DEFAULT '0', * `email-views` int(11) NOT NULL DEFAULT '0', * `email-viewed` int(11) NOT NULL DEFAULT '0', @@ -81,7 +83,7 @@ * `emailed` int(11) NOT NULL DEFAULT '0', * `response` int(11) NOT NULL DEFAULT '0', * `recovery` int(11) NOT NULL DEFAULT '0', - * `reminde` int(11) NOT NULL DEFAULT '0', + * `reminded` int(11) NOT NULL DEFAULT '0', * `timeout` int(11) NOT NULL DEFAULT '0', * PRIMARY KEY (`id`), * KEY `SEARCH` (`approval`,`batch-id`,`gardian-id`,`clientel-id`,`hashkey`,`email-agreement-type`,`created`,`emailed`,`response`,`reminde`,`timeout`) USING BTREE KEY_BLOCK_SIZE=32 @@ -99,8 +101,59 @@ { self::initVar('id', XOBJ_DTYPE_INT, null, false); - self::initVar('fontid', XOBJ_DTYPE_INT, null, false); - self::initVar('value', XOBJ_DTYPE_INT, null, false); + self::initVar('mailbox-id', XOBJ_DTYPE_INT, null, false); + self::initVar('uid', XOBJ_DTYPE_INT, null, false); + self::initVar('approval', XOBJ_DTYPE_ENUM, 'Waiting', false, false, false, consentEnumeratorValues(basename(__FILE__), 'approval')); + self::initVar('batch-id', XOBJ_DTYPE_INT, null, false); + self::initVar('gardian-id', XOBJ_DTYPE_INT, null, false); + self::initVar('clientel-id', XOBJ_DTYPE_INT, null, false); + self::initVar('hashkey', XOBJ_DTYPE_TXTBOX, null, false, 12); + self::initVar('referee', XOBJ_DTYPE_TXTBOX, null, false, 18); + self::initVar('callback-url', XOBJ_DTYPE_TXTBOX, null, false, 255); + self::initVar('svn-paths', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('gardian-filename-pdf', XOBJ_DTYPE_TXTBOX, null, false, 128); + self::initVar('clientel-filename-pdf', XOBJ_DTYPE_TXTBOX, null, false, 128); + self::initVar('gardian-response-file', XOBJ_DTYPE_TXTBOX, null, false, 128); + self::initVar('clientel-response-file', XOBJ_DTYPE_TXTBOX, null, false, 128); + self::initVar('response-waiting', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'response-waiting')); + self::initVar('response-sourced', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'response-sourced')); + self::initVar('response-comment', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('response-network', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('response-notified', XOBJ_DTYPE_INT, null, false); + self::initVar('response-weight', XOBJ_DTYPE_INT, null, false); + self::initVar('response-gardian-weight', XOBJ_DTYPE_INT, null, false); + self::initVar('response-clientel-weight', XOBJ_DTYPE_INT, null, false); + self::initVar('email-ids', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('email-agreement-type', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'email-agreement-type')); + self::initVar('email-recovery-type', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'email-recovery-type')); + self::initVar('email-recovery-guardian-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-recovery-clientel-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-from', XOBJ_DTYPE_TXTBOX, null, false, 64); + self::initVar('email-email-from', XOBJ_DTYPE_INT, null, false, 196); + self::initVar('email-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-gardian-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-gardian-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-gardian-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-clientel-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-clientel-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-clientel-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-remiders-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-remiders-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-remiders-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-progress-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-progress-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-progress-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-recovery-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-recovery-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-recovery-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('created', XOBJ_DTYPE_INT, null, false); + self::initVar('emailed', XOBJ_DTYPE_INT, null, false); + self::initVar('reponse', XOBJ_DTYPE_INT, null, false); + self::initVar('recovery', XOBJ_DTYPE_INT, null, false); + self::initVar('reminded', XOBJ_DTYPE_INT, null, false); + self::initVar('timeout', XOBJ_DTYPE_INT, null, false); if (!empty($id) && !is_null($id)) { Modified: XoopsModules/consent/trunk/modules/consent/class/batches.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/batches.php 2017-08-19 20:29:28 UTC (rev 13273) +++ XoopsModules/consent/trunk/modules/consent/class/batches.php 2017-08-23 12:12:25 UTC (rev 13274) @@ -32,6 +32,8 @@ * <code> * CREATE TABLE `consent_batches` ( * `id` int(20) NOT NULL AUTO_INCREMENT, + * `type` enum('Collect','CSV','None') NOT NULL DEFAULT 'None', + * `mailbox-id` int(13) NOT NULL DEFAULT '0', * `uid` int(13) NOT NULL DEFAULT '0', * `hashkey` varchar(12) NOT NULL DEFAULT '', * `referee` varchar(18) NOT NULL DEFAULT '', @@ -73,24 +75,24 @@ * `email-recovery-sent` int(11) NOT NULL DEFAULT '0', * `email-recovery-views` int(11) NOT NULL DEFAULT '0', * `email-recovery-viewed` int(11) NOT NULL DEFAULT '0', - * `batches` int(11) NOT NULL DEFAULT '0', + * `agreements-created` int(11) NOT NULL DEFAULT '0', * `gardians-created` int(11) NOT NULL DEFAULT '0', * `clientel-created` int(11) NOT NULL DEFAULT '0', * `gardians-existed` int(11) NOT NULL DEFAULT '0', * `clientel-existed` int(11) NOT NULL DEFAULT '0', - * `batches-failed` int(11) NOT NULL DEFAULT '0', + * `agreements-failed` int(11) NOT NULL DEFAULT '0', * `gardians-failed` int(11) NOT NULL DEFAULT '0', * `clientel-failed` int(11) NOT NULL DEFAULT '0', - * `batches-approved` int(11) NOT NULL DEFAULT '0', + * `agreements-approved` int(11) NOT NULL DEFAULT '0', * `gardians-approved` int(11) NOT NULL DEFAULT '0', * `clientel-approved` int(11) NOT NULL DEFAULT '0', - * `batches-unapproved` int(11) NOT NULL DEFAULT '0', + * `agreements-unapproved` int(11) NOT NULL DEFAULT '0', * `gardians-unapproved` int(11) NOT NULL DEFAULT '0', * `clientel-unapproved` int(11) NOT NULL DEFAULT '0', - * `batches-recovery` int(11) NOT NULL DEFAULT '0', + * `agreements-recovery` int(11) NOT NULL DEFAULT '0', * `gardians-recovery` int(11) NOT NULL DEFAULT '0', * `clientel-recovery` int(11) NOT NULL DEFAULT '0', - * `batches-recovered` int(11) NOT NULL DEFAULT '0', + * `agreements-recovered` int(11) NOT NULL DEFAULT '0', * `gardians-recovered` int(11) NOT NULL DEFAULT '0', * `clientel-recovered` int(11) NOT NULL DEFAULT '0', * `approvals` int(11) NOT NULL DEFAULT '0', @@ -99,6 +101,7 @@ * `created` int(11) NOT NULL DEFAULT '0', * `timeout` int(11) NOT NULL DEFAULT '0', * `reported` int(11) NOT NULL DEFAULT '0', + * `reporting` int(11) NOT NULL DEFAULT '0', * PRIMARY KEY (`id`), * KEY `SEARCH` (`hashkey`,`email`,`timeout`) USING BTREE KEY_BLOCK_SIZE=32 * ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -115,8 +118,76 @@ { self::initVar('id', XOBJ_DTYPE_INT, null, false); - self::initVar('fontid', XOBJ_DTYPE_INT, null, false); - self::initVar('value', XOBJ_DTYPE_INT, null, false); + self::initVar('type', XOBJ_DTYPE_ENUM, 'Waiting', false, false, false, consentEnumeratorValues(basename(__FILE__), 'type')); + self::initVar('mailbox-id', XOBJ_DTYPE_INT, null, false); + self::initVar('uid', XOBJ_DTYPE_INT, null, false); + self::initVar('hashkey', XOBJ_DTYPE_TXTBOX, null, false, 12); + self::initVar('referee', XOBJ_DTYPE_TXTBOX, null, false, 18); + self::initVar('org', XOBJ_DTYPE_TXTBOX, null, false, 64); + self::initVar('name', XOBJ_DTYPE_TXTBOX, null, false, 64); + self::initVar('email', XOBJ_DTYPE_TXTBOX, null, false, 12); + self::initVar('phone', XOBJ_DTYPE_TXTBOX, null, false, 18); + self::initVar('message', XOBJ_DTYPE_OTHER, null, false); + self::initVar('event', XOBJ_DTYPE_OTHER, null, false); + self::initVar('cc', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('bcc', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('callback-url', XOBJ_DTYPE_TXTBOX, null, false, 255); + self::initVar('email-agreement-type', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'email-agreement-type')); + self::initVar('csv-lines', XOBJ_DTYPE_INT, null, false); + self::initVar('csv-bytes', XOBJ_DTYPE_INT, null, false); + self::initVar('csv-md5', XOBJ_DTYPE_TXTBOX, null, false, 32); + self::initVar('csv-field', XOBJ_DTYPE_TXTBOX, ",", false, 8); + self::initVar('csv-terminated', XOBJ_DTYPE_TXTBOX, "\n", false, 8); + self::initVar('csv-string', XOBJ_DTYPE_TXTBOX, '"', false, 8); + self::initVar('response-weight', XOBJ_DTYPE_INT, null, false); + self::initVar('response-gardian-weight', XOBJ_DTYPE_INT, null, false); + self::initVar('response-clientel-weight', XOBJ_DTYPE_INT, null, false); + self::initVar('email-from', XOBJ_DTYPE_TXTBOX, null, false, 64); + self::initVar('email-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-gardian-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-gardian-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-gardian-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-clientel-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-clientel-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-clientel-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-remiders-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-remiders-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-remiders-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-progress-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-progress-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-progress-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('email-recovery-sent', XOBJ_DTYPE_INT, null, false); + self::initVar('email-recovery-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-recovery-viewed', XOBJ_DTYPE_INT, null, false); + self::initVar('agreements-created', XOBJ_DTYPE_INT, null, false); + self::initVar('gardians-created', XOBJ_DTYPE_INT, null, false); + self::initVar('clientel-created', XOBJ_DTYPE_INT, null, false); + self::initVar('gardians-existed', XOBJ_DTYPE_INT, null, false); + self::initVar('clientel-existed', XOBJ_DTYPE_INT, null, false); + self::initVar('agreements-failed', XOBJ_DTYPE_INT, null, false); + self::initVar('gardians-failed', XOBJ_DTYPE_INT, null, false); + self::initVar('clientel-failed', XOBJ_DTYPE_INT, null, false); + self::initVar('agreements-approved', XOBJ_DTYPE_INT, null, false); + self::initVar('gardians-approved', XOBJ_DTYPE_INT, null, false); + self::initVar('clientel-approved', XOBJ_DTYPE_INT, null, false); + self::initVar('agreements-unapproved', XOBJ_DTYPE_INT, null, false); + self::initVar('gardians-unapproved', XOBJ_DTYPE_INT, null, false); + self::initVar('clientel-unapproved', XOBJ_DTYPE_INT, null, false); + self::initVar('agreements-recovery', XOBJ_DTYPE_INT, null, false); + self::initVar('gardians-recovery', XOBJ_DTYPE_INT, null, false); + self::initVar('clientel-recovery', XOBJ_DTYPE_INT, null, false); + self::initVar('agreements-recovered', XOBJ_DTYPE_INT, null, false); + self::initVar('gardians-recovered', XOBJ_DTYPE_INT, null, false); + self::initVar('clientel-recovered', XOBJ_DTYPE_INT, null, false); + self::initVar('approvals', XOBJ_DTYPE_INT, null, false); + self::initVar('reminders', XOBJ_DTYPE_INT, null, false); + self::initVar('recovery', XOBJ_DTYPE_INT, null, false); + self::initVar('created', XOBJ_DTYPE_INT, null, false); + self::initVar('timeout', XOBJ_DTYPE_INT, null, false); + self::initVar('reported', XOBJ_DTYPE_INT, null, false); + self::initVar('reporting', XOBJ_DTYPE_INT, null, false); if (!empty($id) && !is_null($id)) { Modified: XoopsModules/consent/trunk/modules/consent/class/callbacks.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/callbacks.php 2017-08-19 20:29:28 UTC (rev 13273) +++ XoopsModules/consent/trunk/modules/consent/class/callbacks.php 2017-08-23 12:12:25 UTC (rev 13274) @@ -35,8 +35,8 @@ * `uri` varchar(250) NOT NULL DEFAULT '', * `timeout` int(4) NOT NULL DEFAULT '0', * `connection` int(4) NOT NULL DEFAULT '0', - * `data` mediumtext NOT NULL, - * `queries` mediumtext NOT NULL, + * `data` longtext, + * `queries` longtext, * `fails` int(3) NOT NULL DEFAULT '0', * PRIMARY KEY (`when`) * ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -52,9 +52,13 @@ function __construct($id = null) { - self::initVar('id', XOBJ_DTYPE_INT, null, false); - self::initVar('fontid', XOBJ_DTYPE_INT, null, false); - self::initVar('value', XOBJ_DTYPE_INT, null, false); + self::initVar('when', XOBJ_DTYPE_INT, null, false); + self::initVar('uri', XOBJ_DTYPE_TXTBOX, null, false, 250); + self::initVar('timeout', XOBJ_DTYPE_INT, null, false); + self::initVar('connection', XOBJ_DTYPE_INT, null, false); + self::initVar('data', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('queries', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('fails', XOBJ_DTYPE_INT, null, false); if (!empty($id) && !is_null($id)) { Modified: XoopsModules/consent/trunk/modules/consent/class/clientel.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/clientel.php 2017-08-19 20:29:28 UTC (rev 13273) +++ XoopsModules/consent/trunk/modules/consent/class/clientel.php 2017-08-23 12:12:25 UTC (rev 13274) @@ -43,7 +43,7 @@ * `undelivered` int(11) NOT NULL DEFAULT '0', * `recovered` int(11) NOT NULL DEFAULT '0', * `recovery-id` int(20) NOT NULL DEFAULT '0', - * `agreement-ids` mediumtext, + * `agreement-ids` longtext, * `email-views` int(11) NOT NULL DEFAULT '0', * `email-viewed` int(11) NOT NULL DEFAULT '0', * PRIMARY KEY (`id`), @@ -62,8 +62,20 @@ { self::initVar('id', XOBJ_DTYPE_INT, null, false); - self::initVar('fontid', XOBJ_DTYPE_INT, null, false); - self::initVar('value', XOBJ_DTYPE_INT, null, false); + self::initVar('uid', XOBJ_DTYPE_INT, null, false); + self::initVar('hashkey', XOBJ_DTYPE_TXTBOX, null, false, 12); + self::initVar('name', XOBJ_DTYPE_TXTBOX, null, false, 64); + self::initVar('email', XOBJ_DTYPE_TXTBOX, null, false, 196); + self::initVar('phone', XOBJ_DTYPE_TXTBOX, null, false, 20); + self::initVar('created', XOBJ_DTYPE_INT, null, false); + self::initVar('emailed', XOBJ_DTYPE_INT, null, false); + self::initVar('response', XOBJ_DTYPE_INT, null, false); + self::initVar('undelivered', XOBJ_DTYPE_INT, null, false); + self::initVar('recovered', XOBJ_DTYPE_INT, null, false); + self::initVar('recovery-id', XOBJ_DTYPE_INT, null, false); + self::initVar('agreement-ids', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('email-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-viewed', XOBJ_DTYPE_INT, null, false); if (!empty($id) && !is_null($id)) { Modified: XoopsModules/consent/trunk/modules/consent/class/emails.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/emails.php 2017-08-19 20:29:28 UTC (rev 13273) +++ XoopsModules/consent/trunk/modules/consent/class/emails.php 2017-08-23 12:12:25 UTC (rev 13274) @@ -60,8 +60,18 @@ { self::initVar('id', XOBJ_DTYPE_INT, null, false); - self::initVar('fontid', XOBJ_DTYPE_INT, null, false); - self::initVar('value', XOBJ_DTYPE_INT, null, false); + self::initVar('approval', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'approval')); + self::initVar('email-type', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'email-type')); + self::initVar('email-target', XOBJ_DTYPE_ENUM, 'Both', false, false, false, consentEnumeratorValues(basename(__FILE__), 'email-target')); + self::initVar('agreement-id', XOBJ_DTYPE_INT, null, false); + self::initVar('batch-id', XOBJ_DTYPE_INT, null, false); + self::initVar('gardian-id', XOBJ_DTYPE_INT, null, false); + self::initVar('clientel-id', XOBJ_DTYPE_INT, null, false); + self::initVar('email', XOBJ_DTYPE_TXTBOX, null, false, 196); + self::initVar('referee', XOBJ_DTYPE_TXTBOX, null, false, 18); + self::initVar('created', XOBJ_DTYPE_INT, null, false); + self::initVar('timeout', XOBJ_DTYPE_INT, null, false); + self::initVar('checked', XOBJ_DTYPE_INT, null, false); if (!empty($id) && !is_null($id)) { Modified: XoopsModules/consent/trunk/modules/consent/class/guardians.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/guardians.php 2017-08-19 20:29:28 UTC (rev 13273) +++ XoopsModules/consent/trunk/modules/consent/class/guardians.php 2017-08-23 12:12:25 UTC (rev 13274) @@ -43,7 +43,7 @@ * `undelivered` int(11) NOT NULL DEFAULT '0', * `recovered` int(11) NOT NULL DEFAULT '0', * `recovery-id` int(20) NOT NULL DEFAULT '0', - * `agreement-ids` mediumtext, + * `agreement-ids` longtext, * `email-views` int(11) NOT NULL DEFAULT '0', * `email-viewed` int(11) NOT NULL DEFAULT '0', * PRIMARY KEY (`id`), @@ -62,8 +62,20 @@ { self::initVar('id', XOBJ_DTYPE_INT, null, false); - self::initVar('fontid', XOBJ_DTYPE_INT, null, false); - self::initVar('value', XOBJ_DTYPE_INT, null, false); + self::initVar('uid', XOBJ_DTYPE_INT, null, false); + self::initVar('hashkey', XOBJ_DTYPE_TXTBOX, null, false, 12); + self::initVar('name', XOBJ_DTYPE_TXTBOX, null, false, 64); + self::initVar('email', XOBJ_DTYPE_TXTBOX, null, false, 196); + self::initVar('phone', XOBJ_DTYPE_TXTBOX, null, false, 20); + self::initVar('created', XOBJ_DTYPE_INT, null, false); + self::initVar('emailed', XOBJ_DTYPE_INT, null, false); + self::initVar('response', XOBJ_DTYPE_INT, null, false); + self::initVar('undelivered', XOBJ_DTYPE_INT, null, false); + self::initVar('recovered', XOBJ_DTYPE_INT, null, false); + self::initVar('recovery-id', XOBJ_DTYPE_INT, null, false); + self::initVar('agreement-ids', XOBJ_DTYPE_ARRAY, array(), false); + self::initVar('email-views', XOBJ_DTYPE_INT, null, false); + self::initVar('email-viewed', XOBJ_DTYPE_INT, null, false); if (!empty($id) && !is_null($id)) { Added: XoopsModules/consent/trunk/modules/consent/class/mailboxs/api.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/mailboxs/api.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/mailboxs/api.php 2017-08-23 12:12:25 UTC (rev 13274) @@ -0,0 +1,199 @@ +<?php +/** + * Legal Consent is a module for obtain legal guardianship consent + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://fonts2web.org.uk + * @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) + * @author Simon Roberts (wishcraft) <wis...@us...> + * @subpackage consent + * @description Legal Consent is a module for obtain legal guardianship consent + * @version 1.0.1 + * @link http://internetfounder.wordpress.com + */ +if (!defined('_MI_CONSENT_MODULE_DIRNAME')) { + return false; +} + +class ConsentMailApi { + + private $host; + private $user; + private $pass; + private $port; + private $folder; + private $ssl; + + private $baseAddress; + private $address; + private $mailbox; + + /** + * Called when the Imap object is created. + * + * Sample of a complete address: {imap.gmail.com:993/imap/ssl}INBOX + * + * @param $host (string) + * The IMAP hostname. Example: imap.gmail.com + * @param $port (int) + * Example: 933 + * @param $ssl (bool) + * TRUE to use SSL, FALSE for no SSL. + * @param $folder (string) + * IMAP Folder to open. + * @param $user (string) + * Username used for connection. Gmail uses full use...@gm..., but + * many providers simply use username. + * @param $pass (string) + * Account password. + * + * @return (empty) + */ + public function __construct($host, $user, $pass, $port, $ssl = true, $folder = 'INBOX') { + if ((!isset($host)) || (!isset($user)) || (!isset($pass)) || (!isset($port))) { + throw new Exception("Error: All Constructor values require a non NULL input."); + } + + $this->host = $host; + $this->user = $user; + $this->pass = $pass; + $this->port = $port; + $this->folder = $folder; + $this->ssl = $ssl; + + $this->changeLoginInfo($host, $user, $pass, $port, $ssl, $folder); + } + + /** + * Change IMAP folders and reconnect to the server. + * + * @param $folderName + * The name of the folder to change to. + * + * @return (empty) + */ + public function changeFolder($folderName) { + + } + + /** + * Log into an IMAP server. + * + * This method is called on the initialization of the class (see + * __construct()), and whenever you need to log into a different account. + * + * Consent see __construct() for parameter info. + * + * @return (empty) + * + * @throws Exception when IMAP can't connect. + */ + public function changeLoginInfo($host, $user, $pass, $port, $ssl, $folder) { + + } + + /** + * Returns an associative array with detailed information about a given + * message. + * + * @param $messageId (int) + * Message id. + * + * @return Associative array with keys (strings unless otherwise noted): + * raw_header + * to + * from + * cc + * bcc + * reply_to + * sender + * date_sent + * subject + * deleted (bool) + * answered (bool) + * draft (bool) + * body + * original_encoding + * size (int) + * auto_response (bool) + * + * @throws Exception when message with given id can't be found. + */ + public function getMessage($messageId) { + + } + + /** + * Deletes an email matching the specified $messageId. + * + * @param $messageId (int) + * Message id. + * @param $immediate (bool) + * Set TRUE if message should be deleted immediately. Otherwise, message + * will not be deleted until disconnect() is called. Normally, this is a + * bad idea, as other message ids will change if a message is deleted. + * + * @return (empty) + * + * @throws Exception when message can't be deleted. + */ + public function deleteMessage($messageId, $immediate = FALSE) { + + } + + /** + * Moves an email into the given mailbox. + * + * @param $messageId (int) + * Message id. + * @param $folder (string) + * The name of the folder (mailbox) into which messages should be moved. + * $folder could either be the folder name or 'INBOX.foldername'. + * + * @return (bool) + * Returns TRUE on success, FALSE on failure. + */ + public function moveMessage($messageId, $folder) { + + } + + /** + * Returns an associative array with email subjects and message ids for all + * messages in the active $folder. + * + * @return Associative array with message id as key and subject as value. + */ + public function getMessageIds() { + + } + + /** + * Return an associative array containing the number of recent, unread, and + * total messages. + * + * @return Associative array with keys: + * unread + * recent + * total + */ + public function getCurrentMailboxInfo() { + + } + + /** + * Return an array of objects containing mailbox information. + * + * @return Array of mailbox names. + */ + public function getMailboxInfo() { + + } + + +} Added: XoopsModules/consent/trunk/modules/consent/class/mailboxs/imap.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/mailboxs/imap.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/mailboxs/imap.php 2017-08-23 12:12:25 UTC (rev 13274) @@ -0,0 +1,767 @@ +<?php +/** + * Legal Consent is a module for obtain legal guardianship consent + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://fonts2web.org.uk + * @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) + * @author Simon Roberts (wishcraft) <wis...@us...> + * @subpackage consent + * @description Legal Consent is a module for obtain legal guardianship consent + * @version 1.0.1 + * @link http://internetfounder.wordpress.com + */ + + +if (!defined('_MI_CONSENT_MODULE_DIRNAME')) { + return false; +} + +class ConsentMailImap { + + private $host; + private $user; + private $pass; + private $port; + private $folder; + private $ssl; + + private $baseAddress; + private $address; + private $mailbox; + + /** + * Called when the Imap object is created. + * + * Sample of a complete address: {imap.gmail.com:993/imap/ssl}INBOX + * + * @param $host (string) + * The IMAP hostname. Example: imap.gmail.com + * @param $port (int) + * Example: 933 + * @param $ssl (bool) + * TRUE to use SSL, FALSE for no SSL. + * @param $folder (string) + * IMAP Folder to open. + * @param $user (string) + * Username used for connection. Gmail uses full use...@gm..., but + * many providers simply use username. + * @param $pass (string) + * Account password. + * + * @return (empty) + */ + public function __construct($host, $user, $pass, $port, $ssl = true, $folder = 'INBOX') { + if ((!isset($host)) || (!isset($user)) || (!isset($pass)) || (!isset($port))) { + throw new Exception("Error: All Constructor values require a non NULL input."); + } + + $this->host = $host; + $this->user = $user; + $this->pass = $pass; + $this->port = $port; + $this->folder = $folder; + $this->ssl = $ssl; + + $this->changeLoginInfo($host, $user, $pass, $port, $ssl, $folder); + } + + /** + * Change IMAP folders and reconnect to the server. + * + * @param $folderName + * The name of the folder to change to. + * + * @return (empty) + */ + public function changeFolder($folderName) { + if ($this->ssl) { + $address = '{' . $this->host . ':' . $this->port . '/imap/ssl}' . $folderName; + } else { + $address = '{' . $this->host . ':' . $this->port . '/imap}' . $folderName; + } + + $this->address = $address; + $this->reconnect(); + } + + /** + * Log into an IMAP server. + * + * This method is called on the initialization of the class (see + * __construct()), and whenever you need to log into a different account. + * + * Consent see __construct() for parameter info. + * + * @return (empty) + * + * @throws Exception when IMAP can't connect. + */ + public function changeLoginInfo($host, $user, $pass, $port, $ssl, $folder) { + if ($ssl) { + $baseAddress = '{' . $host . ':' . $port . '/imap/ssl}'; + $address = $baseAddress . $folder; + } else { + $baseAddress = '{' . $host . ':' . $port . '/imap}'; + $address = $baseAddress . $folder; + } + + // Set the new address and the base address. + $this->baseAddress = $baseAddress; + $this->address = $address; + + // Open new IMAP connection + if ($mailbox = imap_open($address, $user, $pass)) { + $this->mailbox = $mailbox; + } else { + throw new Exception("Error: " . imap_last_error()); + } + } + + /** + * Returns an associative array with detailed information about a given + * message. + * + * @param $messageId (int) + * Message id. + * + * @return Associative array with keys (strings unless otherwise noted): + * raw_header + * to + * from + * cc + * bcc + * reply_to + * sender + * date_sent + * subject + * deleted (bool) + * answered (bool) + * draft (bool) + * body + * original_encoding + * size (int) + * auto_response (bool) + * + * @throws Exception when message with given id can't be found. + */ + public function getMessage($messageId) { + $this->tickle(); + + // Get message details. + $details = imap_headerinfo($this->mailbox, $messageId); + if ($details) { + // Get the raw headers. + $raw_header = imap_fetchheader($this->mailbox, $messageId); + + // Detect whether the message is an autoresponse. + $autoresponse = $this->detectAutoresponder($raw_header); + + // Get some basic variables. + $deleted = ($details->Deleted == 'D'); + $answered = ($details->Answered == 'A'); + $draft = ($details->Draft == 'X'); + + // Get the message body. + $body = imap_fetchbody($this->mailbox, $messageId, 1.2); + if (!strlen($body) > 0) { + $body = imap_fetchbody($this->mailbox, $messageId, 1); + } + $attachments = array(); + if (property_exists($body, 'parts')) + { + $attachment=0; + $current_attach_index=1; + while(!empty($body) + || property_exists($body, 'parts') + || array_key_exists($current_attach_index - 1, $body->parts) + ) { + $attachment++; + $parts_count = count($body->parts) + 1; + if ($current_attach_index > $parts_count) { + continue; + } else { + + while (true) { + if ($current_attach_index > $parts_count) { + continue; + } else { + + $part = $body->parts[$current_attach_index - 1]; + + if (!property_exists($part, 'disposition') || !in_array($part->disposition, $this->attachment_types)) { + $current_attach_index++; + continue; + } + + if (!empty($part->parameters)) { + $parameters = $part->parameters; + $fattr = 'NAME'; + $attachments[$attachment]['type'] = 'INLINE'; + } else { + $parameters = $part->dparameters; + $fattr = 'FILENAME'; + $attachments[$attachment]['type'] = 'ATTACHMENT'; + } + + foreach ($parameters as $parameter) { + if ($parameter->attribute == $fattr) { + $filename = $parameter->value; + } + if (strpos(' '.$parameter->attribute, 'mime')) + $attachments[$attachment]['mimetype'] = $parameter->value; + } + + if (isset($attachments[$attachment]['mimetype']) && !empty($attachments[$attachment]['mimetype']) && !empty($filename) && strpos($filename, ".")>0) + { + $mimetypesHandler = xoops_getModuleHandler('mimetypes', _MI_CONSENT_MODULE_DIRNAME); + $mime = $mimetypesHandler->create(); + $mime->setVar('mimetype', $attachments[$attachment]['mimetype']); + $parts = array_reverse(explode(".", $filename)); + $i=0; + foreach($parts as $key => $value) + { + $i++; + if ($i<=2) + { + if (strlen($value)>=5) + unset($parts[$keys]); + } else + unset($parts[$keys]); + } + $extension = implode(".", array_reverse($parts)); + $mime->setVar('extensions', array($extension=>$extension)); + $mimetypesHandler->insert($mime, true); + unset($mime); + } + + if (empty($filename)) { + $current_attach_index++; + continue; + } + + $decoded = imap_mime_header_decode($filename); + $filename = ''; + foreach ($decoded as $dec) { + if (!empty($dec->text)) { + $encoding = $dec->charset; + $fpart = $dec->text; + $filename .= $fpart; + } + } + + $attachments[$attachment]['filename'] = $filename; + $attachments[$attachment]['data'] = base64_decode(imap_fetchbody($this->mbox, $messageId, $current_attach_index)); + $attachments[$attachment]['md5'] = md5($attachments[$attachment]['data']); + $current_attach_index++; + } + } + } + } + } + // Get the message body encoding. + $encoding = $this->getEncodingType($messageId); + + // Decode body into plaintext (8bit, 7bit, and binary are exempt). + if ($encoding == 'BASE64') { + $body = $this->decodeBase64($body); + } + elseif ($encoding == 'QUOTED-PRINTABLE') { + $body = $this->decodeQuotedPrintable($body); + } + elseif ($encoding == '8BIT') { + $body = $this->decode8Bit($body); + } + elseif ($encoding == '7BIT') { + $body = $this->decode7Bit($body); + } + + // Build the message. + $message = array( + 'raw_header' => $raw_header, + 'to' => $details->toaddress, + 'from' => $details->fromaddress, + 'cc' => isset($details->ccaddress) ? $details->ccaddress : '', + 'reply_to' => isset($details->reply_toaddress) ? $details->reply_toaddress : '', + 'sender' => $details->senderaddress, + 'date_sent' => $details->date, + 'subject' => $details->subject, + 'body' => $body, + 'auto_response' => $autoresponse, + 'attachments' => $attachments + ); + } + else { + throw new Exception("Message could not be found: " . imap_last_error()); + } + + return $message; + } + + /** + * Deletes an email matching the specified $messageId. + * + * @param $messageId (int) + * Message id. + * @param $immediate (bool) + * Set TRUE if message should be deleted immediately. Otherwise, message + * will not be deleted until disconnect() is called. Normally, this is a + * bad idea, as other message ids will change if a message is deleted. + * + * @return (empty) + * + * @throws Exception when message can't be deleted. + */ + public function deleteMessage($messageId, $immediate = FALSE) { + $this->tickle(); + + // Mark message for deletion. + if (!imap_delete($this->mailbox, $messageId)) { + throw new Exception("Message could not be deleted: " . imap_last_error()); + } + + // Immediately delete the message if $immediate is TRUE. + if ($immediate) { + imap_expunge($this->mailbox); + } + } + + /** + * Moves an email into the given mailbox. + * + * @param $messageId (int) + * Message id. + * @param $folder (string) + * The name of the folder (mailbox) into which messages should be moved. + * $folder could either be the folder name or 'INBOX.foldername'. + * + * @return (bool) + * Returns TRUE on success, FALSE on failure. + */ + public function moveMessage($messageId, $folder) { + $messageRange = $messageId . ':' . $messageId; + return imap_mail_move($this->mailbox, $messageRange, '{sslmail.webguyz.net:143/imap}Questionable'); + } + + /** + * Returns an associative array with email subjects and message ids for all + * messages in the active $folder. + * + * @return Associative array with message id as key and subject as value. + */ + public function getMessageIds() { + $this->tickle(); + + // Fetch overview of mailbox. + $number_messages = imap_num_msg($this->mailbox); + if ($number_messages) { + $overviews = imap_fetch_overview($this->mailbox, "1:" . imap_num_msg($this->mailbox), 0); + } + else { + $overviews = array(); + } + $messageArray = array(); + + // Loop through message overviews, build message array. + foreach($overviews as $overview) { + $messageArray[$overview->msgno] = $overview->subject; + } + + return $messageArray; + } + + /** + * Return an associative array containing the number of recent, unread, and + * total messages. + * + * @return Associative array with keys: + * unread + * recent + * total + */ + public function getCurrentMailboxInfo() { + $this->tickle(); + + // Get general mailbox information. + $info = imap_status($this->mailbox, $this->address, SA_ALL); + $mailInfo = array( + 'unread' => $info->unseen, + 'recent' => $info->recent, + 'total' => $info->messages, + ); + return $mailInfo; + } + + /** + * Return an array of objects containing mailbox information. + * + * @return Array of mailbox names. + */ + public function getMailboxInfo() { + $this->tickle(); + + // Get all mailbox information. + $mailboxInfo = imap_getmailboxes($this->mailbox, $this->baseAddress, '*'); + $mailboxes = array(); + foreach ($mailboxInfo as $mailbox) { + // Remove baseAddress from mailbox name. + $mailboxes[] = array( + 'mailbox' => $mailbox->name, + 'name' => str_replace($this->baseAddress, '', $mailbox->name), + ); + } + + return $mailboxes; + } + + /** + * Decodes Base64-encoded text. + * + * @param $text (string) + * Base64 encoded text to convert. + * + * @return (string) + * Decoded text. + */ + public function decodeBase64($text) { + $this->tickle(); + return imap_base64($text); + } + + /** + * Decodes quoted-printable text. + * + * @param $text (string) + * Quoted printable text to convert. + * + * @return (string) + * Decoded text. + */ + public function decodeQuotedPrintable($text) { + return quoted_printable_decode($text); + } + + /** + * Decodes 8-Bit text. + * + * @param $text (string) + * 8-Bit text to convert. + * + * @return (string) + * Decoded text. + */ + public function decode8Bit($text) { + return quoted_printable_decode(imap_8bit($text)); + } + + /** + * Decodes 7-Bit text. + * + * PHP seems to think that most emails are 7BIT-encoded, therefore this + * decoding method assumes that text passed through may actually be base64- + * encoded, quoted-printable encoded, or just plain text. Instead of passing + * the email directly through a particular decoding function, this method + * runs through a bunch of common encoding schemes to try to decode everything + * and simply end up with something *resembling* plain text. + * + * Results are not guaranteed, but it's pretty good at what it does. + * + * @param $text (string) + * 7-Bit text to convert. + * + * @return (string) + * Decoded text. + */ + public function decode7Bit($text) { + // If there are no spaces on the first line, assume that the body is + // actually base64-encoded, and decode it. + $lines = explode("\r\n", $text); + $first_line_words = explode(' ', $lines[0]); + if ($first_line_words[0] == $lines[0]) { + $text = base64_decode($text); + } + + // Manually convert common encoded characters into their UTF-8 equivalents. + $characters = array( + '=20' => ' ', // space. + '=2C' => ',', // comma. + '=E2=80=99' => "'", // single quote. + '=0A' => "\r\n", // line break. + '=0D' => "\r\n", // carriage return. + '=A0' => ' ', // non-breaking space. + '=B9' => '$sup1', // 1 superscript. + '=C2=A0' => ' ', // non-breaking space. + "=\r\n" => '', // joined line. + '=E2=80=A6' => '…', // ellipsis. + '=E2=80=A2' => '•', // bullet. + '=E2=80=93' => '–', // en dash. + '=E2=80=94' => '—', // em dash. + ); + + // Loop through the encoded characters and replace any that are found. + foreach ($characters as $key => $value) { + $text = str_replace($key, $value, $text); + } + + return $text; + } + + /** + * Strips quotes (older messages) from a message body. + * + * This function removes any lines that begin with a quote character (>). + * Note that quotes in reply bodies will also be removed by this function, + * so only use this function if you're okay with this behavior. + * + * @param $message (string) + * The message to be cleaned. + * @param $plain_text_output (bool) + * Set to TRUE to also run the text through strip_tags() (helpful for + * cleaning up HTML emails). + * + * @return (string) + * Same as message passed in, but with all quoted text removed. + * + * @see http://stackoverflow.com/a/12611562/100134 + */ + public function cleanReplyEmail($message, $plain_text_output = FALSE) { + // Strip markup if $plain_text_output is set. + if ($plain_text_output) { + $message = strip_tags($message); + } + + // Remove quoted lines (lines that begin with '>'). + $message = preg_replace("/(^\w.+:\n)?(^>.*(\n|$))+/mi", '', $message); + + // Remove lines beginning with 'On' and ending with 'wrote:' (matches + // Mac OS X Mail, Gmail). + $message = preg_replace("/^(On).*(wrote:).*$/sm", '', $message); + + // Remove lines like '----- Original Message -----' (some other clients). + // Also remove lines like '--- On ... wrote:' (some other clients). + $message = preg_replace("/^---.*$/mi", '', $message); + + // Remove lines like '____________' (some other clients). + $message = preg_replace("/^____________.*$/mi", '', $message); + + // Remove blocks of text with formats like: + // - 'From: Sent: To: Subject:' + // - 'From: To: Sent: Subject:' + // - 'From: Date: To: Reply-to: Subject:' + $message = preg_replace("/From:.*^(To:).*^(Subject:).*/sm", '', $message); + + // Remove any remaining whitespace. + $message = trim($message); + + return $message; + } + + /** + * Takes in a string of email addresses and returns an array of addresses + * as objects. For example, passing in 'John Doe <jo...@sa...>' + * returns the following array: + * + * Array ( + * [0] => stdClass Object ( + * [mailbox] => johndoe + * [host] => sample.com + * [personal] => John Doe + * ) + * ) + * + * You can pass in a string with as many addresses as you'd like, and each + * address will be parsed into a new object in the returned array. + * + * @param $addresses (string) + * String of one or more email addresses to be parsed. + * + * @return (array) + * Array of parsed email addresses, as objects. + * + * @see imap_rfc822_parse_adrlist(). + */ + public function parseAddresses($addresses) { + return imap_rfc822_parse_adrlist($addresses, '#'); + } + + /** + * Create an email address to RFC822 specifications. + * + * @param $username (string) + * Name before the @ sign in an email address (example: 'johndoe'). + * @param $host (string) + * Address after the @ sign in an email address (example: 'sample.com'). + * @param $name (string) + * Name of the entity (example: 'John Doe'). + * + * @return (string) Email Address in the following format: + * 'John Doe <jo...@sa...>' + */ + public function createAddress($username, $host, $name) { + return imap_rfc822_write_address($username, $host, $name); + } + + /** + * Returns structured information for a given message id. + * + * @param $messageId + * Message id for which structure will be returned. + * + * @return (object) + * See imap_fetchstructure() return values for details. + * + * @see imap_fetchstructure(). + */ + public function getStructure($messageId) { + return imap_fetchstructure($this->mailbox, $messageId); + } + + /** + * Returns the primary body type for a given message id. + * + * @param $messageId (int) + * Message id. + * @param $numeric (bool) + * Set to true for a numerical body type. + * + * @return (mixed) + * Integer value of body type if numeric, string if not numeric. + */ + public function getBodyType($messageId, $numeric = false) { + // See imap_fetchstructure() documentation for explanation. + $types = array( + 0 => 'Text', + 1 => 'Multipart', + 2 => 'Message', + 3 => 'Application', + 4 => 'Audio', + 5 => 'Image', + 6 => 'Video', + 7 => 'Other', + ); + + // Get the structure of the message. + $structure = $this->getStructure($messageId); + + // Return a number or a string, depending on the $numeric value. + if ($numeric) { + return $structure->type; + } else { + return $types[$structure->type]; + } + } + + /** + * Returns the encoding type of a given $messageId. + * + * @param $messageId (int) + * Message id. + * @param $numeric (bool) + * Set to true for a numerical encoding type. + * + * @return (mixed) + * Integer value of body type if numeric, string if not numeric. + */ + public function getEncodingType($messageId, $numeric = false) { + // See imap_fetchstructure() documentation for explanation. + $encodings = array( + 0 => '7BIT', + 1 => '8BIT', + 2 => 'BINARY', + 3 => 'BASE64', + 4 => 'QUOTED-PRINTABLE', + 5 => 'OTHER', + ); + + // Get the structure of the message. + $structure = $this->getStructure($messageId); + + // Return a number or a string, depending on the $numeric value. + if ($numeric) { + return $structure->encoding; + } else { + return $encodings[$structure->encoding]; + } + } + + /** + * Closes an active IMAP connection. + * + * @return (empty) + */ + public function disconnect() { + // Close the connection, deleting all messages marked for deletion. + imap_close($this->mailbox, CL_EXPUNGE); + } + + /** + * Reconnect to the IMAP server. + * + * @return (empty) + * + * @throws Exception when IMAP can't reconnect. + */ + private function reconnect() { + $this->mailbox = imap_open($this->address, $this->user, $this->pass); + if (!$this->mailbox) { + throw new Exception("Reconnection Failure: " . imap_last_error()); + } + } + + /** + * Checks to see if the connection is alive. If not, reconnects to server. + * + * @return (empty) + */ + private function tickle() { + if (!imap_ping($this->mailbox)) { + $this->reconnect; + } + } + + /** + * Determines whether the given message is from an auto-responder. + * + * This method checks whether the header contains any auto response headers as + * outlined in RFC 3834, and also checks to see if the subject line contains + * certain strings set by different email providers to indicate an automatic + * response. + * + * @see http://tools.ietf.org/html/rfc3834 + * + * @param $header (string) + * Message header as returned by imap_fetchheader(). + * + * @return (bool) + * TRUE if this message comes from an autoresponder. + */ + private function detectAutoresponder($header) { + $autoresponder_strings = array( + 'X-Autoresponse:', // Other email servers. + 'X-Autorespond:', // LogSat server. + 'Subject: Auto Response', // Yahoo mail. + 'Out of office', // Generic. + 'Out of the office', // Generic. + 'out of the office', // Generic. + 'Auto-reply', // Generic. + 'Autoreply', // Generic. + 'autoreply', // Generic. + ); + + // Check for presence of different autoresponder strings. + foreach ($autoresponder_strings as $string) { + if (strpos($header, $string) !== false) { + return true; + } + } + + return false; + } + +} Property changes on: XoopsModules/consent/trunk/modules/consent/class/mailboxs/imap.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/consent/trunk/modules/consent/class/mailboxs.php =================================================================== --- XoopsModules/consent/trunk/modules/consent/class/mailboxs.php (rev 0) +++ XoopsModules/consent/trunk/modules/consent/class/mailboxs.php 2017-08-23 12:12:25 UTC (rev 13274) @@ -0,0 +1,318 @@ +<?php +/** + * Legal Consent is a module for obtain legal guardianship consent + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://fonts2web.org.uk + * @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) + * @author Simon Roberts (wishcraft) <wis...@us...> + * @subpackage consent + * @description Legal Consent is a module for obtain legal guardianship consent + * @version 1.0.1 + * @link http://internetfounder.wordpress.com + */ + + +if (!defined('_MI_CONSENT_MODULE_DIRNAME')) { + return false; +} + +//* +require_once (dirname(__DIR__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php'); +require_once (__DIR__ . DIRECTORY_SEPARATOR . 'objects.php'); +require_once (__DIR__ . DIRECTORY_SEPARATOR . 'mailboxs' . DIRECTORY_SEPARATOR . 'api.php'); +require_once (__DIR__ . DIRECTORY_SEPARATOR . 'mailboxs' . DIRECTORY_SEPARATOR . 'imap.php'); + +/** + * Class for Mailboxs in consent email ticketer + * + * For Table:- + * <code> + * CREATE TABLE `consent_mailboxs` ( + * `id` int(14) unsigned NOT NULL AUTO_INCREMENT, + * `email` varchar(196) DEFAULT '', + * `host-imap` varchar(300) DEFAULT '', + * `host-smtp` varchar(300) DEFAULT '', + * `username` varchar(198) DEFAULT '', + * `password` varchar(198) DEFAULT '', + * `port-imap` int(12) DEFAULT '993', + * `port-smtp` int(12) DEFAULT '25', + * `folders` mediumtext, + * `ssl` enum('Yes','No') DEFAULT 'Yes', + * `method` enum('IMAP+SMTP','API') DEFAULT 'IMAP+SMTP', + * `attachments` enum('Yes','No') DEFAULT 'Yes', + * `signature` enum('Both','Staff','Manager','Department','None') DEFAULT 'Both', + * `collect` enum('Yes','No') DEFAULT 'Yes', + * `images` enum('Yes','No') DEFAULT 'Yes', + * `uids` LONGTEXT, + * `agreements-id` LONGTEXT, + * `guardians-id` LONGTEXT, + * `clientels-id` LONGTEXT, + * `sent-emails-id` LONGTEXT, + * `mimetypes-id` LONGTEXT, + * `sent-emails` int(12) DEFAULT '0', + * `recieved-emails` int(12) DEFAULT '0', + * `errors` int(12) DEFAULT '0', + * `keywords` int(12) DEFAULT '0', + * `last-email-id` int(32) DEFAULT '0', + * `waiting` int(12) DEFAULT '540', + * `created` int(12) DEFAULT '0', + * `errored` int(12) DEFAULT '0', + * `action` int(12) DEFAULT '0', + * PRIMARY KEY (`id`), + * KEY `SEARCH` (`errored`,`action`,`waiting`,`uids`(18),`agreements-ids`(18),`guardians-ids`(18),`clientels-ids`(18),`last-emails-id`(24)) + * ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + * </code> + * @author Simon Roberts (wis...@us...) + * @copyright copyright (c) 2015 labs.coop + */ +class consentMailboxs extends consentXoopsObject +{ + + var $handler = ''; + + function __construct($id = null) + { + + self::initVar('id', XOBJ_DTYPE_INT, null, false); + self::initVar('email', XOBJ_DTYPE_TXTBOX, null, false, 300); + self::initVar('host-imap', XOBJ_DTYPE_TXTBOX, null, false, 300); + self::initVar('host-smtp', XOBJ_DTYPE_TXTBOX, null, false, 300); + self::initVar('username', XOBJ_DTYPE_TXTBOX, null, false, 198); + self::initVar('password... [truncated message content] |