Index: /extensions/Copyrights/INSTALL
===================================================================
--- /extensions/Copyrights/INSTALL	(revision 10874)
+++ /extensions/Copyrights/INSTALL	(revision 10874)
@@ -0,0 +1,1 @@
+See that README, Chapter 2.
Index: /extensions/Copyrights/README
===================================================================
--- /extensions/Copyrights/README	(revision 10874)
+++ /extensions/Copyrights/README	(revision 10874)
@@ -0,0 +1,44 @@
+Copyrights plugin for Piwigo Web Gallery
+========================================
+
++-----------------------------------------------------------------+
+| Author: Johan Commelin                                          |
+| Email:  j.commelin@deltawerken.org                              |
+| URL:    http://www.watergallery.nl/piwigo/plugins/copyrights/   |
++-----------------------------------------------------------------+
+
+Table of Contents
+1. Rationale
+2. Installation
+3. Managing copyrights
+  3.1 Creating copyrights
+  3.2 Editing copyrights
+
+
+1. Rationale
+The Copyrights plugin is intended for Piwigo users who want to protect their
+work with copyrights. The plugin comes with an administration area where
+several copyrights can be created. When these copyrights are created, they can
+be added to media elements of Piwigo via drop down menus (e.g. in the Batch
+Manager)
+
+
+2. Installation
+To install the Copyrights plugin, go to the plugin management in the
+administration area of your Piwigo install.
+* Administration -> Plugins -> Manage -> Other plugins available
+Then search for 'Copyrights' and click 'Install'. Afterwards go to your plugin
+list and install and activate the plugin.
+* Search: 'Copyrights' -> Install -> Plugins list -> Install -> Activate
+
+
+3. Managing copyrights
+To manage (create or edit) copyrights, go to the plugin management in the
+administration area of your Piwigo install, and click the Copyrights plugin.
+This will give you a page where you can manage your copyrights.
+
+  3.1 Creating copyrights
+TODO
+
+  3.2 Editing copyrights
+TODO
Index: /extensions/Copyrights/admin.php
===================================================================
--- /extensions/Copyrights/admin.php	(revision 10874)
+++ /extensions/Copyrights/admin.php	(revision 10874)
@@ -0,0 +1,113 @@
+<?php
+
+if (!defined("PHPWG_ROOT_PATH")){
+  die("Hacking attempt!");
+}
+
+include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+
+// Check access and exit when user status is not ok
+check_status(ACCESS_ADMINISTRATOR);
+
+// Default is to create, if changed to 1, show edit page
+$edit = 0;
+
+// The values for the form fields
+$CRid = 0;
+$CRname = '';
+$CRurl = '';
+$CRvisible = 0;
+
+// Do managing of copyrights
+if (isset($_GET['tab'])) {
+  if ($_GET['tab'] == 'create') {
+    $name = $_REQUEST['name'];
+    $url = $_REQUEST['url'];
+    $visible = (isset($_REQUEST['visible']) ? 1 : 0);
+    $query = '
+      INSERT INTO '.COPYRIGHTS_ADMIN.'
+      (`name`,`url`,`visible`) VALUES
+      ("'.$name.'","'.$url.'",'.$visible.')
+      ;';
+    pwg_query($query);
+  }
+
+  if ($_GET['tab'] == 'edit') {
+    $edit = 1;
+    $CRid = $_REQUEST['id'];
+    $query = '
+      SELECT *
+      FROM '.COPYRIGHTS_ADMIN.'
+      WHERE `cr_id`='.$CRid.'
+      ;';
+    $result = pwg_query($query);
+    $row = pwg_db_fetch_assoc($result);
+    $CRname = $row['name'];
+    $CRurl = $row['url'];
+    $CRvisible = $row['visible'];
+  }
+
+  if ($_GET['tab'] == 'update') {
+    $id = $_REQUEST['id'];
+    $name = $_REQUEST['name'];
+    $url = $_REQUEST['url'];
+    $visible = (isset($_REQUEST['visible']) ? 1 : 0);
+    $query = '
+      UPDATE '.$prefixeTable.'copyrights_admin
+      SET `name`="'.$name.'", `url`="'.$url.'", `visible`='.$visible.'
+      WHERE `cr_id`='.$id.'
+      ;';
+    pwg_query($query);
+  }
+  
+  if ($_GET['tab'] == 'delete') {
+    $id = $_REQUEST['id'];
+    $query = '
+      DELETE FROM '.$prefixeTable.'copyrights_admin
+      WHERE `cr_id`='.$id.'
+      ;';
+    pwg_query($query);
+  }
+}
+
+// Create page template
+global $template;
+
+$template->set_filenames(
+  array(
+    'plugin_admin_content' => dirname(__FILE__).'/admin.tpl'
+  )
+);
+
+$query = '
+  SELECT *
+  FROM '.COPYRIGHTS_ADMIN.'
+  ;';
+$result = pwg_query($query);
+
+while ($row = pwg_db_fetch_assoc($result)) {
+  $template->append(
+    'CRs',
+    array(
+      'cr_id'   => $row['cr_id'],
+      'name'    => $row['name'],
+      'url'     => $row['url'],
+      'visible' => $row['visible']
+    )
+  );
+}
+
+$template->assign(
+  'COPYRIGHTS_PATH',
+  COPYRIGHTS_WEB_PATH
+);
+
+$template->assign('edit', $edit);
+$template->assign('CRid', $CRid);
+$template->assign('CRname', $CRname);
+$template->assign('CRurl', $CRurl);
+$template->assign('CRvisible', $CRvisible);
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+
+?>
Index: /extensions/Copyrights/admin.tpl
===================================================================
--- /extensions/Copyrights/admin.tpl	(revision 10874)
+++ /extensions/Copyrights/admin.tpl	(revision 10874)
@@ -0,0 +1,72 @@
+<div class = "titlePage">
+  <h2>{'Copyrights'|@translate}</h2>
+</div>
+
+<form action='{$COPYRIGHTS_PATH}-{if $edit == 0}create{else}update{/if}'
+      method='POST'>
+  <fieldset>
+    <legend>{if $edit == 0}{'Create copyright'|@translate}
+            {else}{'Update copyright'|@translate}{/if}</legend>
+      {if $edit != 0}<input type='hidden' name='id' id='id' value='{$CRid}' />{/if}
+      <table>
+        <tr>
+          <td>{'Name'|@translate}</td>
+          <td><input type='text' name='name' id='name' value='{$CRname}' /></td>
+        </tr>
+        <tr>
+          <td>{'URL'|@translate}</td>
+          <td><input type='text' name='url'  id='url'  value='{$CRurl}' /></td>
+        </tr>
+        <tr>
+          <td>{'Visible'|@translate}</td>
+          <td>{if $CRvisible != 0}
+            <input type='checkbox' name='visible' id='visible' value='show' checked='checked' />
+          {else}
+            <input type='checkbox' name='visible' id='visible' value='show' />
+            {/if}</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td><input type='submit' value="{if $edit == 0}{'Create'|@translate}{else}{'Update'|@translate}{/if}" /></td>
+        </tr>
+      </table>
+  </fieldset>
+</form>
+{if $edit == 0}
+<form>
+  <fieldset>
+    <legend>{'Edit copyright'|@translate}</legend>
+    <table>
+      <tr>
+        <th>{'Name'|@translate}</th>
+        <th>{'URL'|@translate}</th>
+        <th>{'Visible'|@translate}</th>
+        <th>{'Actions'|@translate}</th>
+      </tr>
+    {if not empty($CRs)}
+    {foreach from=$CRs item=CR}
+    {strip}
+      <tr class="{cycle values="row1,row2"}">
+        <td>{$CR.name}</td>
+        <td><a href="{$CR.url}">{$CR.url}</a></td>
+        <td>{if $CR.visible != 0}{'Yes'|@translate}
+          {else}{'No'|@translate}{/if}
+        </td>
+        <td>
+          <a href="{$COPYRIGHTS_PATH}-edit&id={$CR.cr_id}">
+            <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png"
+            alt="{'Edit'|@translate}" title="{'Edit'|@translate}" />
+          </a>
+          <a href="{$COPYRIGHTS_PATH}-delete&id={$CR.cr_id}" onclick="return confirm(document.getElementById('btn_delete').title + '\n\n' + '{'Are you sure?'|@translate|@escape:'javascript'}');">
+            <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/delete.png"
+            id="btn_delete" alt="{'Delete'|@translate}" title="{'Delete copyright'|@translate}" />
+          </a>
+        </td>
+      </tr>
+    {/strip}
+    {/foreach}
+    {/if}
+    </table>
+  </fieldset>
+</form>
+{/if}
Index: /extensions/Copyrights/batch.tpl
===================================================================
--- /extensions/Copyrights/batch.tpl	(revision 10874)
+++ /extensions/Copyrights/batch.tpl	(revision 10874)
@@ -0,0 +1,3 @@
+<div id="copyrights">
+  {'Copyright'|@translate} {html_options name=copyrightID options=$CRoptions}
+</div>
Index: /extensions/Copyrights/include/functions.inc.php
===================================================================
--- /extensions/Copyrights/include/functions.inc.php	(revision 10874)
+++ /extensions/Copyrights/include/functions.inc.php	(revision 10874)
@@ -0,0 +1,3 @@
+<?php
+
+?>
Index: /extensions/Copyrights/language/en_UK/description.txt
===================================================================
--- /extensions/Copyrights/language/en_UK/description.txt	(revision 10874)
+++ /extensions/Copyrights/language/en_UK/description.txt	(revision 10874)
@@ -0,0 +1,1 @@
+Create copyrights and assign them to your photos.
Index: /extensions/Copyrights/language/en_UK/index.php
===================================================================
--- /extensions/Copyrights/language/en_UK/index.php	(revision 10874)
+++ /extensions/Copyrights/language/en_UK/index.php	(revision 10874)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Copyrights/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/Copyrights/language/en_UK/plugin.lang.php	(revision 10874)
+++ /extensions/Copyrights/language/en_UK/plugin.lang.php	(revision 10874)
@@ -0,0 +1,4 @@
+<?php
+
+
+?>
Index: /extensions/Copyrights/language/index.php
===================================================================
--- /extensions/Copyrights/language/index.php	(revision 10874)
+++ /extensions/Copyrights/language/index.php	(revision 10874)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Copyrights/language/nl_NL/description.txt
===================================================================
--- /extensions/Copyrights/language/nl_NL/description.txt	(revision 10874)
+++ /extensions/Copyrights/language/nl_NL/description.txt	(revision 10874)
@@ -0,0 +1,1 @@
+Maak copyrights aan, en ken ze toe aan uw foto\'s.
Index: /extensions/Copyrights/language/nl_NL/index.php
===================================================================
--- /extensions/Copyrights/language/nl_NL/index.php	(revision 10874)
+++ /extensions/Copyrights/language/nl_NL/index.php	(revision 10874)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Copyrights/language/nl_NL/plugin.lang.php
===================================================================
--- /extensions/Copyrights/language/nl_NL/plugin.lang.php	(revision 10874)
+++ /extensions/Copyrights/language/nl_NL/plugin.lang.php	(revision 10874)
@@ -0,0 +1,4 @@
+<?php
+
+
+?>
Index: /extensions/Copyrights/main.inc.php
===================================================================
--- /extensions/Copyrights/main.inc.php	(revision 10874)
+++ /extensions/Copyrights/main.inc.php	(revision 10874)
@@ -0,0 +1,112 @@
+<?php
+/*
+Plugin Name: Copyrights
+Version: Alpha
+Description: Create copyrights and assign them to your photos.
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=537
+Author: Matty & Johan (dwo)
+Author URI: http://www.watergallery.nl/piwigo/plugins/copyrights/
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+define('COPYRIGHTS_PATH',
+    PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)) . '/'); // The plugin path
+define('COPYRIGHTS_WEB_PATH', get_root_url().'admin.php?page=plugin-copyrights');
+
+global $prefixeTable;
+define('COPYRIGHTS_ADMIN', $prefixeTable.'copyrights_admin'); // The db
+define('COPYRIGHTS_MEDIA', $prefixeTable.'copyrights_media'); // The db
+
+include_once(COPYRIGHTS_PATH . 'include/functions.inc.php');
+
+/* Plugin admin */
+add_event_handler('get_admin_plugin_menu_links', 'copyrights_admin_menu');
+function copyrights_admin_menu($menu) {
+  array_push(
+    $menu,
+    array(
+      'NAME'  => 'Copyrights',
+      'URL'   => get_admin_plugin_menu_link(dirname(__FILE__)).'/admin.php'
+    )
+  );      
+  return $menu;
+}
+
+// Add copyrights drop down menu to the batch manager
+add_event_handler('loc_end_element_set_global', 'copyrights_batch');
+// Add handler to the submit event of the batch manager
+add_event_handler('element_set_global_action', 'copyrights_batch_submit', 50, 2);
+
+function copyrights_batch()
+{
+  global $template;
+
+  //load_language('plugin.lang', dirname(__FILE__).'/');					// Engels is voorlopig goed zat
+
+  // Assign the template for batch management
+  $template->set_filename('batch', dirname(__FILE__).'/batch.tpl');
+
+  // Fetch all the copyrights and assign them to the template
+  $query = '
+    SELECT `cr_id`,`name`
+    FROM '.COPYRIGHTS_ADMIN.'
+    WHERE `visible`<>0
+    ;';
+  $result = pwg_query($query);
+  $CRoptions = array();
+  while ($row = pwg_db_fetch_assoc($result)) {
+    $CRoptions[$row['cr_id']] = $row['name'];
+  }
+  $template->assign('CRoptions', $CRoptions);
+
+  
+  // Goed, ik weet dus echt niet waarom dit hieronder gedaan wordt...
+  // AHA!!!! - dit is er zodat de "choose action" optie deze plugin gebruikt....
+  $template->append('element_set_global_plugins_actions', array(
+    'ID' => 'copyrights',	// ID of the batch manager action
+    'NAME' => 'Edit copyrights', // Description of the batch manager action
+    'CONTENT' => $template->parse('batch', true)
+    )
+  );
+}
+
+// * Deze functie wordt een keer aangeroepen, nadat de gebruiker submit.
+// * Fietst met een foreach loop over de geselecteerde fotos
+// * Rammelt alle toevoegingen in 1x met mass_updates naar de db.
+function copyrights_batch_submit($action, $collection)
+{
+  if ($action == 'copyrights')
+  {
+	  $crID = $_POST['copyrightID'];
+    
+    if (count($collection) > 0) {
+      $query = '
+        DELETE
+        FROM '.COPYRIGHTS_MEDIA.'
+        WHERE media_id IN ('.implode(',', $collection).')
+        ;';
+      pwg_query($query);
+    }
+
+    $edits = array();
+    foreach ($collection as $image_id)
+    {
+      array_push(
+        $edits,
+        array(
+          'media_id' => $image_id,
+          'cr_id' => $crID,
+          )
+        );
+    }
+
+    mass_inserts(
+      COPYRIGHTS_MEDIA, // Table name
+      array_keys($edits[0]), //Columns
+      $edits // Data
+    );
+  }
+}
+
+?>
Index: /extensions/Copyrights/maintain.inc.php
===================================================================
--- /extensions/Copyrights/maintain.inc.php	(revision 10874)
+++ /extensions/Copyrights/maintain.inc.php	(revision 10874)
@@ -0,0 +1,98 @@
+<?php
+
+function plugin_install() {
+  global $conf, $prefixeTable;
+  $query = "
+    CREATE TABLE IF NOT EXISTS ".$prefixeTable."copyrights_admin (
+      cr_id int(11) NOT NULL AUTO_INCREMENT,
+      name varchar(255) UNIQUE NOT NULL,
+      url varchar(255) NOT NULL,
+      visible bool DEFAULT 0,
+      PRIMARY KEY (cr_id)
+    ) ENGINE=MyISAM DEFAULT CHARACTER SET utf8
+    ;";
+  pwg_query($query);
+
+  $query = "
+    CREATE TABLE IF NOT EXISTS ".$prefixeTable."copyrights_media (
+      media_id int(11) NOT NULL,
+      cr_id int(11) default NULL
+    ) ENGINE = MyISAM DEFAULT CHARACTER SET utf8
+    ;";
+  pwg_query($query);
+}
+
+function plugin_activate() {
+  global $prefixeTable;
+
+  $query = "
+    SELECT COUNT(*)
+    FROM ".$prefixeTable."copyrights_admin
+    ;";
+  list($counter) = pwg_db_fetch_row(pwg_query($query));
+  if (0 == $counter) {
+    copyrights_create_default();
+  }
+}
+
+function plugin_uninstall() {
+  global $prefixeTable;
+
+  $query = "
+    DROP TABLE ".$prefixeTable."copyrights_admin
+    ;";
+  pwg_query($query);
+
+  $query = "
+    DROP TABLE ".$prefixeTable."copyrights_media
+    ;";
+  pwg_query($query);
+}
+
+function copyrights_create_default() {
+  global $prefixeTable;
+
+  // Insert the copyrights of Creative Commons
+  $inserts = array(
+    array(
+      'name' => 'Creative Commons (BY)',
+      'url' => 'http://creativecommons.org/licenses/by/3.0/',
+      'visible' => 1
+    ),
+    array(
+      'name' => 'Creative Commons (BY-SA)',
+      'url' => 'http://creativecommons.org/licenses/by-sa/3.0/',
+      'visible' => 1
+    ),
+    array(
+      'name' => 'Creative Commons (BY-ND)',
+      'url' => 'http://creativecommons.org/licenses/by-nd/3.0/',
+      'visible' => 1
+    ),
+    array(
+      'name' => 'Creative Commons (BY-NC)',
+      'url' => 'http://creativecommons.org/licenses/by-nc/3.0/',
+      'visible' => 1
+    ),
+    array(
+      'name' => 'Creative Commons (BY-NC-SA)',
+      'url' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/',
+      'visible' => 1
+    ),
+    array(
+      'name' => 'Creative Commons (BY-NC-ND)',
+      'url' => 'http://creativecommons.org/licenses/by-nc-nd/3.0/',
+      'visible' => 1
+    )
+  );
+
+  mass_inserts(
+    $prefixeTable.'copyrights_admin',
+    array(
+      'name',
+      'url',
+      'visible'
+    ),
+    $inserts
+  );
+}
Index: /extensions/Copyrights/manage_copyrights.php
===================================================================
--- /extensions/Copyrights/manage_copyrights.php	(revision 10874)
+++ /extensions/Copyrights/manage_copyrights.php	(revision 10874)
@@ -0,0 +1,34 @@
+if ($_REQUEST['action'] == 'create') {
+  $name = $_REQUEST['name'];
+  $url = $_REQUEST['url'];
+  $visible = ($_REQUEST['visible'] == 'hide' ? 1 : 0);
+  $query = '
+    INSERT INTO '.$prefixeTable.'copyrights_admin
+    (`name`,`url`,`visible`) VALUES
+    ("'.$name.'","'.$url.'",'.$visible.')
+    ;';
+  pwg_query($query);
+}
+
+if ($_REQUEST['action'] == 'edit') {
+  $id = $_REQUEST['id'];
+  $name = $_REQUEST['name'];
+  $url = $_REQUEST['url'];
+  $visible = ($_REQUEST['visible'] == 'show' ? 1 : 0);
+  $query = '
+    UPDATE '.$prefixeTable.'copyrights_admin
+    `name`="'.$name.'", `url`="'.$url.'", `visible`='.$visible.'
+    WHERE `cr_id`='.$id.'
+    ;';
+  pwg_query($query);
+}
+
+if ($_REQUEST['action'] == 'delete') {
+  $id = $_REQUEST['id'];
+  $query = '
+    DELETE FROM '.$prefixeTable.'copyrights_admin
+    WHERE `cr_id`='.$id.'
+    ;';
+  pwg_query($query);
+}
+?>
