diff --git a/htdocs/lolix/index.php b/htdocs/lolix/index.php
new file mode 100644
index 00000000000..d6144dadd4a
--- /dev/null
+++ b/htdocs/lolix/index.php
@@ -0,0 +1,139 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+require("./pre.inc.php");
+
+$user->getrights('propale');
+
+if ($user->societe_id > 0)
+{
+ $socidp = $user->societe_id;
+}
+
+llxHeader("","","Lolix");
+
+function valeur($sql)
+{
+ global $db;
+ if ( $db->query($sql) )
+ {
+ if ( $db->num_rows() )
+ {
+ $valeur = $db->result(0,0);
+ }
+ $db->free();
+ }
+ return $valeur;
+}
+/*
+ *
+ */
+
+print_titre("Espace Lolix");
+
+print '
';
+print '';
+/*
+ *
+ *
+ */
+$sql = "SELECT count(*) as cc, o.active";
+$sql .= " FROM lolixfr.offre as o ";
+$sql .= " GROUP BY o.active DESC";
+
+$active[1] = "Active";
+$active[0] = "Inactive";
+$active[-2] = "Inactive";
+$active[-3] = "Inactive (désactivée robots)";
+$active[-4] = "Inactive (???)";
+
+if ( $db->query($sql) )
+{
+ $num = $db->num_rows();
+ $i = 0;
+ if ($num > 0 )
+ {
+ print '';
+ print '';
+ print '| Offres | ';
+
+ while ($i < $num)
+ {
+ $obj = $db->fetch_object($i);
+ $var=!$var;
+ print "| rowid."\">".$active[$obj->active]." | ";
+ print ''.$obj->cc." | ";
+ $i++;
+ }
+ print " ";
+ }
+}
+
+/*
+ *
+ *
+ */
+print ' | ';
+/*
+ *
+ *
+ */
+$sql = "SELECT count(*) as cc, o.active";
+$sql .= " FROM lolixfr.candidat as o ";
+$sql .= " GROUP BY o.active DESC";
+
+$active[1] = "Active";
+$active[0] = "Inactive";
+$active[-2] = "Inactive";
+$active[-3] = "Inactive (désactivée robots)";
+$active[-4] = "Inactive (???)";
+
+if ( $db->query($sql) )
+{
+ $num = $db->num_rows();
+ $i = 0;
+ if ($num > 0 )
+ {
+ print '';
+ print '';
+ print '| Candidats | ';
+
+ while ($i < $num)
+ {
+ $obj = $db->fetch_object($i);
+ $var=!$var;
+ print "| rowid."\">".$active[$obj->active]." | ";
+ print ''.$obj->cc." | ";
+ $i++;
+ }
+ print " ";
+ }
+}
+
+
+print ' |
';
+print '
';
+
+$db->close();
+
+
+llxFooter("Dernière modification $Date$ révision $Revision$");
+?>
diff --git a/htdocs/lolix/lolix.societe.class.php b/htdocs/lolix/lolix.societe.class.php
index ebffbc6ec4d..0f652eb3e65 100644
--- a/htdocs/lolix/lolix.societe.class.php
+++ b/htdocs/lolix/lolix.societe.class.php
@@ -93,7 +93,7 @@ class LolixSociete {
{
$this->id = $socid;
- $sql = "SELECT s.nom,s.siren,tel,url,fax";
+ $sql = "SELECT s.nom,s.active,s.siren,s.tel,s.url,s.fax,";
$sql .= $this->db->pdate("s.datec")." as dc";
$sql .= " FROM lolixfr.societe as s";
$sql .= " WHERE s.idp = ".$this->id;
@@ -105,6 +105,7 @@ class LolixSociete {
$obj = $this->db->fetch_object(0);
$this->nom = $obj->nom;
+ $this->active = $obj->active;
$this->tel = $obj->tel;
$this->fax = $obj->fax;
$this->url = $obj->url;
diff --git a/htdocs/lolix/pre.inc.php b/htdocs/lolix/pre.inc.php
new file mode 100644
index 00000000000..a272e26e9b4
--- /dev/null
+++ b/htdocs/lolix/pre.inc.php
@@ -0,0 +1,76 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+require("../main.inc.php");
+require_once DOL_DOCUMENT_ROOT."/lolix/lolix.societe.class.php";
+
+function llxHeader($head = "", $urlp = "", $title="")
+{
+ global $user, $conf, $db;
+
+ /*
+ *
+ *
+ */
+ top_menu($head, $title);
+
+ $menu = new Menu();
+
+
+
+ $menu->add(DOL_URL_ROOT."/lolix/index.php", "Lolix");
+
+ $menu->add_submenu(DOL_URL_ROOT."/lolix/liste.php", "Liste des offres");
+ $menu->add_submenu(DOL_URL_ROOT."/lolix/cv/liste.php", "Liste des CV");
+
+ $menu->add(DOL_URL_ROOT."/lolix/societe/", "Sociétés");
+
+ $menu->add_submenu(DOL_URL_ROOT."/lolix/societe/activation.php", "Activation");
+ $menu->add_submenu(DOL_URL_ROOT."/lolix/societe/liste.php", "Liste");
+
+
+ $menu->add(DOL_URL_ROOT."/lolix/tode.php", "Offres à désactiver");
+
+
+ $menu->add(DOL_URL_ROOT."/lolix/linuxmag.php", "Linux Mag");
+ left_menu($menu->liste);
+}
+
+Function fiche_header($id)
+{
+ $h = 0;
+ $head[0][0] = DOL_URL_ROOT.'/lolix/offre.php?id='.$id;
+ $head[0][1] = "Offre";
+ $h++;
+
+ for($i = 0 ; $i < sizeof($head) ; $i++)
+ {
+ if (strstr($head[$i][0], $GLOBALS["SCRIPT_URL"]) )
+ {
+ $a = $i;
+ // sort de la boucle
+ $i = sizeof($head);
+ }
+ }
+
+ dolibarr_fiche_head($head, $a);
+}
+?>
diff --git a/htdocs/lolix/societe/activation.php b/htdocs/lolix/societe/activation.php
new file mode 100644
index 00000000000..d5415f8c524
--- /dev/null
+++ b/htdocs/lolix/societe/activation.php
@@ -0,0 +1,110 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+require("./pre.inc.php");
+
+llxHeader("","","Lolix - Société a activer");
+
+/*
+ * Sécurité accés client
+ */
+if ($user->societe_id > 0)
+{
+ $action = '';
+ $socidp = $user->societe_id;
+}
+
+if ($page == -1) { $page = 0 ; }
+
+$offset = $conf->liste_limit * $page ;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
+
+$sql = "SELECT s.idp,s.nom, s.ville,".$db->pdate("datec") ." as da";
+$sql .= " FROM lolixfr.societe as s";
+$sql .= " WHERE active = 0";
+
+$sortfield = "s.datec";
+$sortorder = "DESC";
+
+$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit +1, $offset);
+
+$result = $db->query($sql);
+if ($result)
+{
+ $num = $db->num_rows();
+
+
+ print_barre_liste("Societe a activer", $page, "activation.php","",$sortfield,$sortorder,'',$num);
+
+ $i = 0;
+
+ if ($sortorder == "DESC")
+ {
+ $sortorder="ASC";
+ }
+ else
+ {
+ $sortorder="DESC";
+ }
+ print '';
+ print '';
+ print "| ";
+ print_liste_field_titre("Société",$PHP_SELF,"s.nom");
+ print " | ";
+ print_liste_field_titre("Ville",$PHP_SELF,"s.ville");
+ print " | | ";
+
+ print "
\n";
+ $var=True;
+
+ while ($i < min($num,$conf->liste_limit))
+ {
+ $obj = $db->fetch_object( $i);
+
+ $var=!$var;
+
+ print "";
+ print '| ';
+ print img_file();
+ print " ".$obj->nom.' | ';
+
+
+ print " idp\">$obj->ref\n";
+ print "".$obj->ville." | \n";
+
+ print ''.strftime("%d/%m/%Y",$obj->da)." | \n";
+
+ print "
\n";
+ $i++;
+ }
+ print "
";
+ $db->free();
+}
+else
+{
+ print $db->error() . ' ' . $sql;
+}
+
+$db->close();
+
+llxFooter("Dernière modification $Date$ révision $Revision$");
+?>
diff --git a/htdocs/lolix/societe/index.php b/htdocs/lolix/societe/index.php
new file mode 100644
index 00000000000..d6144dadd4a
--- /dev/null
+++ b/htdocs/lolix/societe/index.php
@@ -0,0 +1,139 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+require("./pre.inc.php");
+
+$user->getrights('propale');
+
+if ($user->societe_id > 0)
+{
+ $socidp = $user->societe_id;
+}
+
+llxHeader("","","Lolix");
+
+function valeur($sql)
+{
+ global $db;
+ if ( $db->query($sql) )
+ {
+ if ( $db->num_rows() )
+ {
+ $valeur = $db->result(0,0);
+ }
+ $db->free();
+ }
+ return $valeur;
+}
+/*
+ *
+ */
+
+print_titre("Espace Lolix");
+
+print '';
+print '';
+/*
+ *
+ *
+ */
+$sql = "SELECT count(*) as cc, o.active";
+$sql .= " FROM lolixfr.offre as o ";
+$sql .= " GROUP BY o.active DESC";
+
+$active[1] = "Active";
+$active[0] = "Inactive";
+$active[-2] = "Inactive";
+$active[-3] = "Inactive (désactivée robots)";
+$active[-4] = "Inactive (???)";
+
+if ( $db->query($sql) )
+{
+ $num = $db->num_rows();
+ $i = 0;
+ if ($num > 0 )
+ {
+ print '';
+ print '';
+ print '| Offres | ';
+
+ while ($i < $num)
+ {
+ $obj = $db->fetch_object($i);
+ $var=!$var;
+ print "| rowid."\">".$active[$obj->active]." | ";
+ print ''.$obj->cc." | ";
+ $i++;
+ }
+ print " ";
+ }
+}
+
+/*
+ *
+ *
+ */
+print ' | ';
+/*
+ *
+ *
+ */
+$sql = "SELECT count(*) as cc, o.active";
+$sql .= " FROM lolixfr.candidat as o ";
+$sql .= " GROUP BY o.active DESC";
+
+$active[1] = "Active";
+$active[0] = "Inactive";
+$active[-2] = "Inactive";
+$active[-3] = "Inactive (désactivée robots)";
+$active[-4] = "Inactive (???)";
+
+if ( $db->query($sql) )
+{
+ $num = $db->num_rows();
+ $i = 0;
+ if ($num > 0 )
+ {
+ print '';
+ print '';
+ print '| Candidats | ';
+
+ while ($i < $num)
+ {
+ $obj = $db->fetch_object($i);
+ $var=!$var;
+ print "| rowid."\">".$active[$obj->active]." | ";
+ print ''.$obj->cc." | ";
+ $i++;
+ }
+ print " ";
+ }
+}
+
+
+print ' |
';
+print '
';
+
+$db->close();
+
+
+llxFooter("Dernière modification $Date$ révision $Revision$");
+?>
diff --git a/htdocs/lolix/societe/liste.php b/htdocs/lolix/societe/liste.php
new file mode 100644
index 00000000000..31b18f68e9e
--- /dev/null
+++ b/htdocs/lolix/societe/liste.php
@@ -0,0 +1,110 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+require("./pre.inc.php");
+
+llxHeader("","","Lolix, liste des offres");
+
+/*
+ * Sécurité accés client
+ */
+if ($user->societe_id > 0)
+{
+ $action = '';
+ $socidp = $user->societe_id;
+}
+
+if ($page == -1) { $page = 0 ; }
+
+$offset = $conf->liste_limit * $page ;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
+
+$sql = "SELECT s.nom, s.ville,".$db->pdate("datea") ." as da";
+$sql .= " FROM lolixfr.societe as s";
+
+
+$sortfield = "s.nom";
+$sortorder = "DESC";
+
+$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit +1, $offset);
+
+$result = $db->query($sql);
+if ($result)
+{
+ $num = $db->num_rows();
+
+
+ print_barre_liste("Liste des offres", $page, $PHP_SELF,"",$sortfield,$sortorder,'',$num);
+
+ $i = 0;
+
+ if ($sortorder == "DESC")
+ {
+ $sortorder="ASC";
+ }
+ else
+ {
+ $sortorder="DESC";
+ }
+ print '';
+ print '';
+ print "| ";
+ print_liste_field_titre("Société",$PHP_SELF,"s.nom");
+ print " | ";
+ print_liste_field_titre("Ville",$PHP_SELF,"s.ville");
+ print " | | ";
+
+ print "
\n";
+ $var=True;
+
+ while ($i < min($num,$conf->liste_limit))
+ {
+ $obj = $db->fetch_object( $i);
+
+ $var=!$var;
+
+ print "";
+ print '| ';
+ print img_file();
+ print " ".$obj->nom.' | ';
+
+
+ print " idp\">$obj->ref\n";
+ print "".$obj->ville." | \n";
+
+ print ''.strftime("%d/%m/%Y",$obj->da)." | \n";
+
+ print "
\n";
+ $i++;
+ }
+ print "
";
+ $db->free();
+}
+else
+{
+ print $db->error() . ' ' . $sql;
+}
+
+$db->close();
+
+llxFooter("Dernière modification $Date$ révision $Revision$");
+?>
diff --git a/htdocs/lolix/societe/pre.inc.php b/htdocs/lolix/societe/pre.inc.php
new file mode 100644
index 00000000000..df1d002ea20
--- /dev/null
+++ b/htdocs/lolix/societe/pre.inc.php
@@ -0,0 +1,70 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+require("../../main.inc.php");
+require_once DOL_DOCUMENT_ROOT."/lolix/lolix.societe.class.php";
+
+function llxHeader($head = "", $urlp = "", $title="")
+{
+ global $user, $conf, $db;
+
+ /*
+ *
+ *
+ */
+ top_menu($head, $title);
+
+ $menu = new Menu();
+
+ $menu->add(DOL_URL_ROOT."/lolix/index.php", "Lolix");
+
+ $menu->add(DOL_URL_ROOT."/lolix/societe/", "Sociétés");
+
+ $menu->add_submenu(DOL_URL_ROOT."/lolix/societe/activation.php", "Activation");
+ $menu->add_submenu(DOL_URL_ROOT."/lolix/societe/liste.php", "Liste");
+
+ $menu->add(DOL_URL_ROOT."/lolix/tode.php", "Offres à désactiver");
+
+
+ $menu->add(DOL_URL_ROOT."/lolix/linuxmag.php", "Linux Mag");
+ left_menu($menu->liste);
+}
+
+Function fiche_header($id)
+{
+ $h = 0;
+ $head[0][0] = DOL_URL_ROOT.'/lolix/societe/fiche.php?id='.$id;
+ $head[0][1] = "Societe";
+ $h++;
+
+ for($i = 0 ; $i < sizeof($head) ; $i++)
+ {
+ if (strstr($head[$i][0], $GLOBALS["SCRIPT_URL"]) )
+ {
+ $a = $i;
+ // sort de la boucle
+ $i = sizeof($head);
+ }
+ }
+
+ dolibarr_fiche_head($head, $a);
+}
+?>