From: <ma...@us...> - 2012-01-02 23:04:40
|
Revision: 8629 http://xoops.svn.sourceforge.net/xoops/?rev=8629&view=rev Author: mageg Date: 2012-01-02 23:04:32 +0000 (Mon, 02 Jan 2012) Log Message: ----------- Changes for the new banners module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/blank.gif Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerfinish.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/banners.php Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2012-01-02 23:04:32 UTC (rev 8629) @@ -1,404 +0,0 @@ -<?php -/* - 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. -*/ - -/** - * XOOPS banner management - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package core - * @since 2.0.0 - * @author Kazumi Ono <web...@my...> - * @author Taiwen Jiang <ph...@us...> - * @author DuGris aka L. Jen <http://www.dugris.info> - * @author Kris <kr...@fr...> - * @version $Id$ - */ - -include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mainfile.php'; - -$xoops = Xoops::getInstance(); -$xoops->loadLanguage('banners'); - -/** - * Function to let your client login to see the stats - * - * @return void - */ -function clientlogin() -{ - $xoops = Xoops::getInstance(); - $xoops->header(); - $xoops->theme->addStylesheet(null, null, ' - #login_window { - max-width: 480px; - margin: 1em auto; - background-color: #f8f8f8; - color: inherit; - border: 1px solid #000; - } - - #login_window h2 { - margin: .5em; - padding: 130px 0 0; - background: url(images/password.png) no-repeat center top; - text-align: center; - } - .login_form.credentials { - margin: .5em 1em; - padding: 1em; - background-color: #ccc; - color: inherit; - } - .login_form.credentials label { - display: inline-block; - width: 33 %; - margin: 1px; - } - .login_form . credentials input { - width:50%; - margin: 1px; - padding: 1px; - border: 1px solid #000; - } - .login_form.credentials input:focus { - border: 1px solid #2266cc; - } - .login_form.actions { - padding: 1.5em .5em .5em; - text-align: center; - } - .login_info { - margin: .5em 1em; - text-align: center; - } - .content_title { - font-size: 1.2em; - } - '); - echo "<div id='login_window'> - <h2 class='content_title'>" . _BANNERS_LOGIN_TITLE . "</h2> - <form method='post' action='banners.php' class='login_form'> - <div class='credentials'> - <label for='login_form-login'>" . _BANNERS_LOGIN_LOGIN . "</label> - <input type='text' name='login' id='login_form-login' value='' /><br /> - <label for='login_form-password'>" . _BANNERS_LOGIN_PASS . "</label> - <input type='password' name='pass' id='login_form-password' value='' /><br /> - </div> - <div class='actions'><input type='hidden' name='op' value='Ok' /><button type='submit'>" . _BANNERS_LOGIN_OK . "</button></div> - <div class='login_info'>" . _BANNERS_LOGIN_INFO . "</div>" . $xoops->security->getTokenHTML("BANNER_LOGIN") . " - </form></div>"; - $xoops->footer(); -} - -/** - * Function to display the banners stats for each client - * - * @return void - */ -function bannerstats() -{ - $xoops = Xoops::getInstance(); - if ($_SESSION['banner_login'] == "" || $_SESSION['banner_pass'] == "") { - $xoops->redirect("banners.php", 2, _BANNERS_NO_LOGIN_DATA); - exit(); - } - $client = $xoops->getHandlerBannerclient()->getClient($_SESSION['banner_login'], $_SESSION['banner_pass']); - if ($client) { - $xoops->header(); - $xoops->theme->addStylesheet(null, null, ' - #bannerstats {} - #bannerstats td {text-align: center;} - '); - - echo "<div id='bannerstats'> - <h4 class='content_title'>" . sprintf(_BANNERS_TITLE, $client->getVar('name')) . "</h4><hr /> - <table summary=''> - <caption>" . sprintf(_BANNERS_TITLE, $client->getVar('name')) . "</caption> - <thead><tr> - <td>ID</td> - <td>" . _BANNERS_IMP_MADE . "</td> - <td>" . _BANNERS_IMP_TOTAL . "</td> - <td>" . _BANNERS_IMP_LEFT . "</td> - <td>" . _BANNERS_CLICKS . "</td> - <td>" . _BANNERS_PER_CLICKS . "</td> - <td>" . _BANNERS_FUNCTIONS . "</td></tr></thead> - <tfoot><tr><td colspan='7'></td></tr></tfoot>"; - - $criteria = new Criteria('cid', $client->getVar('cid')); - $banners = $xoops->getHandlerBanner()->getObjects($criteria); - $i = 0; - /* @var $banner XoopsBanner */ - foreach ($banners as $banner) { - if ($banner->getvar('impmade') == 0) { - $percent = 0; - } else { - $percent = substr(100 * $banner->getvar('clicks') / $banner->getvar('impmade'), 0, 5); - } - if ($banner->getvar('imptotal') == 0) { - $left = _BANNERS_UNLIMITED; - } else { - $left = $banner->getvar('imptotal') - $banner->getvar('impmade'); - } - $class = ($i % 2 == 0) ? 'even' : 'odd'; - echo "<tbody><tr class='{$class}'> - <td>" . $banner->getvar('bid') . "</td> - <td>" . $banner->getvar('impmade') . "</td> - <td>" . $banner->getvar('imptotal') . "</td> - <td>{$left}</td> - <td>" . $banner->getvar('clicks') . "</td> - <td>{$percent}%</td> - <td><a href='banners.php?op=EmailStats&cid=" . $banner->getvar('cid') . "&bid=" . $banner->getvar('bid') . "' title='" . _BANNERS_STATS . "'>" . _BANNERS_STATS . "</a></td></tr></tbody>"; - $i++; - } - echo "</table> - <br /><br /> - <h4 class='content_title'>" . _BANNERS_FOW_IN . htmlspecialchars($xoops->getConfig('sitename')) . "</h4><hr />"; - - /* @var $banner XoopsBanner */ - $numrows = count($banners); - foreach ($banners as $banner) { - if ($numrows > 1) { - echo "<br />"; - } - if ($banner->getVar('htmlbanner') && $banner->getVar('htmlcode')) { - $myts = MyTextSanitizer::getInstance(); - echo $myts->displayTarea($banner->getVar('htmlcode')); - } else { - if (strtolower(substr($banner->getVar('imageurl'), strrpos($banner->getVar('imageurl'), "."))) == ".swf") { - echo "<object type='application / x - shockwave - flash' width='468' height='60' data='" . $banner->getVar('imageurl') . "'>"; - echo "<param name='movie' value='" . $banner->getVar('imageurl') . "' />"; - echo "<param name='quality' value='high' />"; - echo "</object>"; - } else { - echo "<img src='" . $banner->getVar('imageurl') . "' alt='' />"; - } - } - echo "<br /><strong>" . _BANNERS_ID . $banner->getVar('bid') . "</strong><br />" . sprintf(_BANNERS_SEND_STATS, 'banners.php?op=EmailStats&cid = ' . $banner->getVar('cid') . '&bid=' . $banner->getVar('bid')) . "<br />"; - if (!$banner->getVar('htmlbanner')) { - echo sprintf(_BANNERS_POINTS, $banner->getVar('clickurl', 'e')) . "<br /> - <form action='banners.php' method='post'>" . _BANNERS_URL . " - <input type='text' name='url' size='50' maxlength='200' value='" . $banner->getVar('clickurl', 'e') . "' /> - <input type='hidden' name='bid' value='" . $banner->getVar('bid') . "' /> - <input type='hidden' name='cid' value='" . $banner->getVar('cid') . "' /> - <input type='submit' name='op' value='" . _BANNERS_CHANGE . "' />" . $xoops->security->getTokenHTML("BANNER_EDIT") . "</form>"; - } - } - - /* Finnished Banners */ - echo "<br />"; - $criteria = new Criteria('cid', $client->getVar('cid')); - $banners = $xoops->getHandlerBannerfinish()->getObjects($criteria); - - if (count($banners) > 0) { - echo "<h4 class='content_title'>" . sprintf(_BANNERS_FINISHED, $client->getvar('name')) . "</h4><hr /> - <table summary=''> - <caption>" . sprintf(_BANNERS_FINISHED, $client->getvar('name')) . "</caption> - <thead><tr> - <td>ID</td> - <td>" . _BANNERS_IMP_MADE . "</td> - <td>" . _BANNERS_CLICKS . "</td> - <td>" . _BANNERS_PER_CLICKS . "</td> - <td>" . _BANNERS_STARTED . "</td> - <td>" . _BANNERS_ENDED . "</td></tr></thead> - <tfoot><tr><td colspan='6'></td></tr></tfoot>"; - - $i = 0; - /* @var $banner XoopsBanner */ - foreach ($banners as $banner) { - if ($banner->getvar('impressions') == 0) { - $percent = 0; - } else { - $percent = substr(100 * $banner->getvar('clicks') / $banner->getvar('impressions'), 0, 5); - } - $class = ($i % 2 == 0) ? 'even' : 'odd'; - echo "<tbody><tr class='{$class}'> - <td>" . $banner->getvar('bid') . "</td> - <td>" . $banner->getvar('impressions') . "</td> - <td>" . $banner->getvar('clicks') . "</td> - <td>{$percent}%</td> - <td>" . XoopsLocal::formatTimestamp($banner->getvar('datestart')) . "</td> - <td>" . XoopsLocal::formatTimestamp($banner->getvar('dateend')) . "</td></tr></tbody>"; - } - echo "</table></div>"; - } - $xoops->footer(); - } else { - $xoops->redirect("banners.php", 2, _BANNERS_INVALID_LOGIN_DATA); - } -} - -/** - * Function to let the client E-mail his banner Stats - * - * @param int $cid - * @param int $bid - * @return void - */ -function EmailStats($cid, $bid) -{ - $xoops = Xoops::getInstance(); - $client = $xoops->getHandlerBannerclient()->getClient($_SESSION['banner_login'], $_SESSION['banner_pass']); - if ($client) { - $cid = intval($cid); - $bid = intval($bid); - if ($client->getVar('email', 'n') == "") { - $xoops->redirect("banners.php", 3, sprintf(_BANNERS_MAIL_ERROR, $client->getVar('name'))); - } else { - $banner = $xoops->getHandlerBanner()->get($bid); - //make sure that the client is the banner owner - if ($banner && $banner->getVar('cid') == $cid) { - if ($banner->getVar('impmade') == 0) { - $percent = 0; - } else { - $percent = substr(100 * $banner->getVar('clicks') / $banner->getVar('impmade'), 0, 5); - } - if ($banner->getVar('imptotal') == 0) { - $left = _BANNERS_UNLIMITED; - $banner->setVar('imptotal', _BANNERS_UNLIMITED); - } else { - $left = $banner->getVar('imptotal') - $banner->getVar('impmade'); - } - $date = date("F jS Y, h:iA."); - $subject = sprintf(_BANNERS_MAIL_SUBJECT, $xoops->getConfig('sitename')); - $message = sprintf(_BANNERS_MAIL_MESSAGE, $xoops->getConfig('sitename'), $client->getVar('name'), $bid, $banner->getVar('imageurl'), $banner->getVar('clickurl'), $banner->getVar('imptotal'), $banner->getVar('impmade'), $left, $banner->getVar('clicks'), $percent, $date); - $xoopsMailer = $xoops->getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setToEmails($client->getVar('email', 'n')); - $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); - $xoopsMailer->setFromName($xoops->getConfig('sitename')); - $xoopsMailer->setSubject($subject); - $xoopsMailer->setBody($message); - - if (!$xoopsMailer->send()) { - $xoops->redirect("banners.php?op=Ok", 3, sprintf(_MAIL_SENDMAILNG, $client->getVar('email', 'n'))); - } - $xoops->redirect("banners.php?op=Ok", 3, _BANNERS_MAIL_OK); - } - } - } - $xoops->redirect("banners.php", 2); -} - -/** - * Function to let the client to change the url for his banner - * - * @param int $cid - * @param int $bid - * @param string $url - * @return void - */ -function change_banner_url_by_client($cid, $bid, $url) -{ - $xoops = Xoops::getInstance(); - $client = $xoops->getHandlerBannerclient()->getClient($_SESSION['banner_login'], $_SESSION['banner_pass']); - if ($client && $client->getVar('cid') == $cid && $url != "") { - $cid = intval($cid); - $bid = intval($bid); - $banner = $xoops->getHandlerBanner()->get($bid); - //make sure that the client is the banner owner - if ($banner->getVar('cid') == $cid) { - $banner->setVar('clickurl', $url); - if ($xoops->getHandlerBanner()->insert($banner)) { - $xoops->redirect("banners.php?op=Ok", 3, _BANNERS_DBUPDATED); - } - } - } - $xoops->redirect("banners.php", 2); -} - -/** - * @param int $bid - * @return void - */ -function clickbanner($bid) -{ - $xoops = Xoops::getInstance(); - $bid = intval($bid); - if ($bid > 0) { - $banner = $xoops->getHandlerBanner()->get($bid); - if ($banner) { - if ($xoops->security->checkReferer()) { - $banner->setVar('clicks', $banner->getVar('clicks') + 1); - $xoops->getHandlerBanner()->insert($banner); - header('Location: ' . $banner->getVar('clickurl')); - exit(); - } else { - //No valid referer found so some javascript error or direct access found - echo _BANNERS_NO_REFERER; - } - } - } - $xoops->redirect(XOOPS_URL, 3, _BANNERS_NO_ID); -} - -$op = ''; -if (!empty($_POST['op'])) { - $op = $_POST['op']; -} else { - if (!empty($_GET['op'])) { - $op = $_GET['op']; - } -} - -$myts = MyTextSanitizer::getInstance(); -switch ($op) { - case "click": - $bid = 0; - if (!empty($_GET['bid'])) { - $bid = intval($_GET['bid']); - } - clickbanner($bid); - break; - case "Ok": - if ($_SERVER['REQUEST_METHOD'] == 'POST') { - if (!$xoops->security->check(true, false, "BANNER_LOGIN")) { - $xoops->redirect("banners.php", 3, implode('<br />', $xoops->security->getErrors())); - exit(); - } - - $_SESSION['banner_login'] = $myts->stripslashesGPC(trim($_POST['login'])); - $_SESSION['banner_pass'] = $myts->stripslashesGPC(trim($_POST['pass'])); - } - bannerstats(); - break; - case _BANNERS_CHANGE: - if (!$xoops->security->check(true, false, "BANNER_EDIT")) { - $xoops->redirect("banners.php", 3, implode('<br />', $xoops->security->getErrors())); - exit(); - } - $bid = $cid = 0; - if (!empty($_POST['url'])) { - $url = $myts->stripslashesGPC(trim($_POST['url'])); - } - if (!empty($_POST['bid'])) { - $bid = intval($_POST['bid']); - } - if (!empty($_POST['cid'])) { - $cid = intval($_POST['cid']); - } - change_banner_url_by_client($cid, $bid, $url); - break; - case "EmailStats": - $bid = $cid = 0; - if (!empty($_GET['bid'])) { - $bid = intval($_GET['bid']); - } - if (!empty($_GET['cid'])) { - $cid = intval($_GET['cid']); - } - EmailStats($cid, $bid); - break; - case "login": - default: - clientlogin(); - break; -} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-01-02 23:04:32 UTC (rev 8629) @@ -307,7 +307,7 @@ 'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES), 'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES), 'xoops_dirname' => $xoops->moduleDirname, - 'xoops_banner' => ($xoops->getConfig('banners') && $this->renderBanner) ? $xoops->getBanner() : ' ', + 'xoops_banner' => $this->renderBanner ? $xoops->getBanner() : ' ', 'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES) )); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-01-02 23:04:32 UTC (rev 8629) @@ -599,16 +599,6 @@ /** * @param mixed $optional * - * @return XoopsBannerfinishHandler - */ - public function getHandlerBannerfinish($optional = false) - { - return $this->getHandler('bannerfinish', $optional); - } - - /** - * @param mixed $optional - * * @return XoopsBlockHandler */ public function getHandlerBlock($optional = false) @@ -1310,48 +1300,56 @@ */ public function getBanner() { - $bresult = $this->db->query('SELECT COUNT(*) FROM ' . $this->db->prefix('banner')); - list ($numrows) = $this->db->fetchRow($bresult); - if ($numrows > 1) { - $numrows = $numrows - 1; - $bannum = mt_rand(0, $numrows); - } else { - $bannum = 0; - } - if ($numrows > 0) { - $bresult = $this->db->query('SELECT * FROM ' . $this->db->prefix('banner'), 1, $bannum); - list ($bid, $cid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $date, $htmlbanner, $htmlcode) = $this->db->fetchRow($bresult); - if ($this->getConfig('my_ip') == $this->getEnv('REMOTE_ADDR')) { - // EMPTY - } else { - $impmade = $impmade + 1; - $this->db->queryF(sprintf('UPDATE %s SET impmade = %u WHERE bid = %u', $this->db->prefix('banner'), $impmade, $bid)); - /** - * Check if this impression is the last one - */ - if ($imptotal > 0 && $impmade >= $imptotal) { - $newid = $this->db->genId($this->db->prefix('bannerfinish') . '_bid_seq'); - $sql = sprintf('INSERT INTO %s (bid, cid, impressions, clicks, datestart, dateend) VALUES (%u, %u, %u, %u, %u, %u)', $this->db->prefix('bannerfinish'), $newid, $cid, $impmade, $clicks, $date, time()); - $this->db->queryF($sql); - $this->db->queryF(sprintf('DELETE FROM %s WHERE bid = %u', $this->db->prefix('banner'), $bid)); + if ($this->getConfig('banners')) { + // Get banners handler + $banner_Handler = $this->getHandlerBanner(); + // Display banner + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('status', 0, '!=')); + $criteria->setSort('RAND()'); + $criteria->setStart(0); + $criteria->setLimit(1); + $banner_arr = $banner_Handler->getall($criteria); + $numrows = count($banner_arr); + if ($numrows > 0) { + foreach (array_keys($banner_arr) as $i) { + $imptotal = $banner_arr[$i]->getVar("imptotal"); + $impmade = $banner_arr[$i]->getVar("impmade"); + $htmlbanner = $banner_arr[$i]->getVar("htmlbanner"); + $htmlcode = $banner_arr[$i]->getVar("htmlcode"); + $imageurl = $banner_arr[$i]->getVar("imageurl"); + $bid = $banner_arr[$i]->getVar("bid"); + $clickurl = $banner_arr[$i]->getVar("clickurl"); } - } - /** - * Print the banner - */ - if ($htmlbanner) { - $bannerobject = $htmlcode; - } else { - $bannerobject = '<div id="xo-bannerfix">'; - if (stristr($imageurl, '.swf')) { - $bannerobject = $bannerobject . '<div id ="xo-fixbanner">' . '<a href="' . XOOPS_URL . '/banners.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a></div>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; + if ($this->getConfig('my_ip') == $this->getEnv('REMOTE_ADDR')) { + // EMPTY } else { - $bannerobject = $bannerobject . '<a href="' . XOOPS_URL . '/banners.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>'; + /** + * Check if this impression is the last one + */ + $impmade = $impmade + 1; + if ($imptotal > 0 && $impmade >= $imptotal) { + $this->db->queryF(sprintf('UPDATE %s SET status = %u, dateend = %u WHERE bid = %u', $this->db->prefix('banner'), 0, time(), $bid)); + }else{ + $this->db->queryF(sprintf('UPDATE %s SET impmade = %u WHERE bid = %u', $this->db->prefix('banner'), $impmade, $bid)); + } } - - $bannerobject = $bannerobject . '</div>'; + /** + * Print the banner + */ + if ($htmlbanner) { + $bannerobject = $htmlcode; + } else { + $bannerobject = '<div id="xo-bannerfix">'; + if (stristr($imageurl, '.swf')) { + $bannerobject .= '<div id ="xo-fixbanner">' . '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a></div>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; + } else { + $bannerobject .= '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>'; + } + $bannerobject .= '</div>'; + } + return $bannerobject; } - return $bannerobject; } return ''; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-01-02 23:04:32 UTC (rev 8629) @@ -73,9 +73,9 @@ $dbm->insert("group_permission", " VALUES(0," . $gruops['XOOPS_GROUP_ADMIN'] . ",16,1,'system_admin')"); $dbm->insert("group_permission", " VALUES(0," . $gruops['XOOPS_GROUP_ADMIN'] . ",17,1,'system_admin')"); // data for table 'banner' - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (1, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', 1008813250, '')"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (2, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_banner_2.gif', 'http://www.xoops.org/', 1008813250, '')"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (3, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/banner.swf', 'http://www.xoops.org/', 1008813250, '')"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (1, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (2, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_banner_2.gif', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (3, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/banner.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); // default theme $time = time(); $dbm->insert('tplset', " VALUES (1, 'default', 'XOOPS Default Template Set', '', " . $time . ")"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql 2012-01-02 23:04:32 UTC (rev 8629) @@ -13,14 +13,9 @@ # Dumping data for table `bannerclient` # -INSERT INTO bannerclient VALUES (0, 'XOOPS', 'XOOPS Dev Team', 'web...@xo...', '', '', ''); +INSERT INTO bannerclient VALUES (1,0, 'XOOPS', 'XOOPS Dev Team'); # -# Dumping data for table `bannerfinish` -# - - -# # Dumping data for table `comments` # Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-01-02 23:04:32 UTC (rev 8629) @@ -1,579 +1,562 @@ -# -# Table structure for table `avatar` -# - -CREATE TABLE avatar ( - avatar_id mediumint(8) unsigned NOT NULL auto_increment, - avatar_file varchar(30) NOT NULL default '', - avatar_name varchar(100) NOT NULL default '', - avatar_mimetype varchar(30) NOT NULL default '', - avatar_created int(10) NOT NULL default '0', - avatar_display tinyint(1) unsigned NOT NULL default '0', - avatar_weight smallint(5) unsigned NOT NULL default '0', - avatar_type char(1) NOT NULL default '', - PRIMARY KEY (avatar_id), - KEY avatar_type (avatar_type, avatar_display) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `avatar_user_link` -# - -CREATE TABLE avatar_user_link ( - avatar_id mediumint(8) unsigned NOT NULL default '0', - user_id mediumint(8) unsigned NOT NULL default '0', - KEY avatar_user_id (avatar_id,user_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `banner` -# - -CREATE TABLE banner ( - bid smallint(5) unsigned NOT NULL auto_increment, - cid tinyint(3) unsigned NOT NULL default '0', - imptotal mediumint(8) unsigned NOT NULL default '0', - impmade mediumint(8) unsigned NOT NULL default '0', - clicks mediumint(8) unsigned NOT NULL default '0', - imageurl varchar(255) NOT NULL default '', - clickurl varchar(255) NOT NULL default '', - date int(10) NOT NULL default '0', - htmlbanner tinyint(1) NOT NULL default '0', - htmlcode text, - PRIMARY KEY (bid), - KEY idxbannercid (cid), - KEY idxbannerbidcid (bid,cid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `bannerclient` -# - -CREATE TABLE bannerclient ( - cid smallint(5) unsigned NOT NULL auto_increment, - name varchar(60) NOT NULL default '', - contact varchar(60) NOT NULL default '', - email varchar(60) NOT NULL default '', - login varchar(10) NOT NULL default '', - passwd varchar(10) NOT NULL default '', - extrainfo text, - PRIMARY KEY (cid), - KEY login (login) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `bannerfinish` -# - -CREATE TABLE bannerfinish ( - bid smallint(5) unsigned NOT NULL auto_increment, - cid smallint(5) unsigned NOT NULL default '0', - impressions mediumint(8) unsigned NOT NULL default '0', - clicks mediumint(8) unsigned NOT NULL default '0', - datestart int(10) unsigned NOT NULL default '0', - dateend int(10) unsigned NOT NULL default '0', - PRIMARY KEY (bid), - KEY cid (cid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `block_module_link` -# - -CREATE TABLE block_module_link ( - block_id mediumint(8) unsigned NOT NULL default '0', - module_id smallint(5) NOT NULL default '0', - PRIMARY KEY (`module_id`, `block_id`) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `comments` -# - -CREATE TABLE xoopscomments ( - com_id mediumint(8) unsigned NOT NULL auto_increment, - com_pid mediumint(8) unsigned NOT NULL default '0', - com_rootid mediumint(8) unsigned NOT NULL default '0', - com_modid smallint(5) unsigned NOT NULL default '0', - com_itemid mediumint(8) unsigned NOT NULL default '0', - com_icon varchar(25) NOT NULL default '', - com_created int(10) unsigned NOT NULL default '0', - com_modified int(10) unsigned NOT NULL default '0', - com_uid mediumint(8) unsigned NOT NULL default '0', - com_ip varchar(15) NOT NULL default '', - com_title varchar(255) NOT NULL default '', - com_text text, - com_sig tinyint(1) unsigned NOT NULL default '0', - com_status tinyint(1) unsigned NOT NULL default '0', - com_exparams varchar(255) NOT NULL default '', - dohtml tinyint(1) unsigned NOT NULL default '0', - dosmiley tinyint(1) unsigned NOT NULL default '0', - doxcode tinyint(1) unsigned NOT NULL default '0', - doimage tinyint(1) unsigned NOT NULL default '0', - dobr tinyint(1) unsigned NOT NULL default '0', - PRIMARY KEY (com_id), - KEY com_pid (com_pid), - KEY com_itemid (com_itemid), - KEY com_uid (com_uid), - KEY com_title (com_title(40)), - KEY com_status (com_status) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# RMV-NOTIFY -# Table structure for table `notifications` -# - -CREATE TABLE xoopsnotifications ( - not_id mediumint(8) unsigned NOT NULL auto_increment, - not_modid smallint(5) unsigned NOT NULL default '0', - not_itemid mediumint(8) unsigned NOT NULL default '0', - not_category varchar(30) NOT NULL default '', - not_event varchar(30) NOT NULL default '', - not_uid mediumint(8) unsigned NOT NULL default '0', - not_mode tinyint(1) NOT NULL default 0, - PRIMARY KEY (not_id), - KEY not_modid (not_modid), - KEY not_itemid (not_itemid), - KEY not_class (not_category), - KEY not_uid (not_uid), - KEY not_event (not_event) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `config` -# - -CREATE TABLE config ( - conf_id smallint(5) unsigned NOT NULL auto_increment, - conf_modid smallint(5) unsigned NOT NULL default '0', - conf_catid smallint(5) unsigned NOT NULL default '0', - conf_name varchar(25) NOT NULL default '', - conf_title varchar(255) NOT NULL default '', - conf_value text, - conf_desc varchar(255) NOT NULL default '', - conf_formtype varchar(15) NOT NULL default '', - conf_valuetype varchar(10) NOT NULL default '', - conf_order smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (conf_id), - KEY conf_mod_cat_id (conf_modid, conf_catid), - KEY conf_order (conf_order) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `configcategory` -# - -CREATE TABLE configcategory ( - confcat_id smallint(5) unsigned NOT NULL auto_increment, - confcat_name varchar(255) NOT NULL default '', - confcat_order smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (confcat_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `configoption` -# - -CREATE TABLE configoption ( - confop_id mediumint(8) unsigned NOT NULL auto_increment, - confop_name varchar(255) NOT NULL default '', - confop_value varchar(255) NOT NULL default '', - conf_id smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (confop_id), - KEY conf_id (conf_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `groups` -# - -CREATE TABLE groups ( - groupid smallint(5) unsigned NOT NULL auto_increment, - name varchar(50) NOT NULL default '', - description text, - group_type varchar(10) NOT NULL default '', - - PRIMARY KEY (groupid), - KEY group_type (group_type) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `group_permission` -# - -CREATE TABLE group_permission ( - gperm_id int(10) unsigned NOT NULL auto_increment, - gperm_groupid smallint(5) unsigned NOT NULL default '0', - gperm_itemid mediumint(8) unsigned NOT NULL default '0', - gperm_modid mediumint(5) unsigned NOT NULL default '0', - gperm_name varchar(50) NOT NULL default '', - PRIMARY KEY (gperm_id), - KEY groupid (gperm_groupid), - KEY itemid (gperm_itemid), - KEY gperm_modid (gperm_modid,gperm_name(10)) -) ENGINE=MyISAM; -# -------------------------------------------------------- - - -# -# Table structure for table `groups_users_link` -# - -CREATE TABLE groups_users_link ( - linkid mediumint(8) unsigned NOT NULL auto_increment, - groupid smallint(5) unsigned NOT NULL default '0', - uid mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (linkid), - KEY groupid_uid (groupid,uid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `image` -# - -CREATE TABLE image ( - image_id mediumint(8) unsigned NOT NULL auto_increment, - image_name varchar(30) NOT NULL default '', - image_nicename varchar(255) NOT NULL default '', - image_mimetype varchar(30) NOT NULL default '', - image_created int(10) unsigned NOT NULL default '0', - image_display tinyint(1) unsigned NOT NULL default '0', - image_weight smallint(5) unsigned NOT NULL default '0', - imgcat_id smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (image_id), - KEY imgcat_id (imgcat_id), - KEY image_display (image_display) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `imagebody` -# - -CREATE TABLE imagebody ( - image_id mediumint(8) unsigned NOT NULL default '0', - image_body mediumblob, - KEY image_id (image_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `imagecategory` -# - -CREATE TABLE imagecategory ( - imgcat_id smallint(5) unsigned NOT NULL auto_increment, - imgcat_name varchar(100) NOT NULL default '', - imgcat_maxsize int(8) unsigned NOT NULL default '0', - imgcat_maxwidth smallint(3) unsigned NOT NULL default '0', - imgcat_maxheight smallint(3) unsigned NOT NULL default '0', - imgcat_display tinyint(1) unsigned NOT NULL default '0', - imgcat_weight smallint(3) unsigned NOT NULL default '0', - imgcat_type char(1) NOT NULL default '', - imgcat_storetype varchar(5) NOT NULL default '', - PRIMARY KEY (imgcat_id), - KEY imgcat_display (imgcat_display) -) ENGINE=MyISAM; -# -------------------------------------------------------- - - -# -# Table structure for table `imgset` -# - -CREATE TABLE imgset ( - imgset_id smallint(5) unsigned NOT NULL auto_increment, - imgset_name varchar(50) NOT NULL default '', - imgset_refid mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (imgset_id), - KEY imgset_refid (imgset_refid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `imgset_tplset_link` -# - -CREATE TABLE imgset_tplset_link ( - imgset_id smallint(5) unsigned NOT NULL default '0', - tplset_name varchar(50) NOT NULL default '', - KEY tplset_name (tplset_name(10)) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `imgsetimg` -# - -CREATE TABLE imgsetimg ( - imgsetimg_id mediumint(8) unsigned NOT NULL auto_increment, - imgsetimg_file varchar(50) NOT NULL default '', - imgsetimg_body blob, - imgsetimg_imgset smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (imgsetimg_id), - KEY imgsetimg_imgset (imgsetimg_imgset) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `modules` -# - -CREATE TABLE modules ( - mid smallint(5) unsigned NOT NULL auto_increment, - name varchar(150) NOT NULL default '', - version smallint(5) unsigned NOT NULL default '100', - last_update int(10) unsigned NOT NULL default '0', - weight smallint(3) unsigned NOT NULL default '0', - isactive tinyint(1) unsigned NOT NULL default '0', - dirname varchar(25) NOT NULL default '', - hasmain tinyint(1) unsigned NOT NULL default '0', - hasadmin tinyint(1) unsigned NOT NULL default '0', - hassearch tinyint(1) unsigned NOT NULL default '0', - hasconfig tinyint(1) unsigned NOT NULL default '0', - hascomments tinyint(1) unsigned NOT NULL default '0', - hasnotification tinyint(1) unsigned NOT NULL default '0', - PRIMARY KEY (mid), - KEY hasmain (hasmain), - KEY hasadmin (hasadmin), - KEY hassearch (hassearch), - KEY hasnotification (hasnotification), - KEY dirname (dirname), - KEY name (name(15)), - KEY isactive (isactive), - KEY weight (weight), - KEY hascomments (hascomments) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `newblocks` -# - -CREATE TABLE newblocks ( - bid mediumint(8) unsigned NOT NULL auto_increment, - mid smallint(5) unsigned NOT NULL default '0', - func_num tinyint(3) unsigned NOT NULL default '0', - options varchar(255) NOT NULL default '', - name varchar(150) NOT NULL default '', - title varchar(255) NOT NULL default '', - content text, - side tinyint(1) unsigned NOT NULL default '0', - weight smallint(5) unsigned NOT NULL default '0', - visible tinyint(1) unsigned NOT NULL default '0', - block_type char(1) NOT NULL default '', - c_type char(1) NOT NULL default '', - isactive tinyint(1) unsigned NOT NULL default '0', - dirname varchar(50) NOT NULL default '', - func_file varchar(50) NOT NULL default '', - show_func varchar(50) NOT NULL default '', - edit_func varchar(50) NOT NULL default '', - template varchar(50) NOT NULL default '', - bcachetime int(10) unsigned NOT NULL default '0', - last_modified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (bid), - KEY mid (mid), - KEY visible (visible), - KEY isactive_visible_mid (isactive,visible,mid), - KEY mid_funcnum (mid,func_num) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `online` -# - -CREATE TABLE online ( - online_uid mediumint(8) unsigned NOT NULL default '0', - online_uname varchar(25) NOT NULL default '', - online_updated int(10) unsigned NOT NULL default '0', - online_module smallint(5) unsigned NOT NULL default '0', - online_ip varchar(15) NOT NULL default '', - KEY online_module (online_module), - KEY online_updated (online_updated), - KEY online_uid (online_uid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `priv_msgs` -# - -CREATE TABLE priv_msgs ( - msg_id mediumint(8) unsigned NOT NULL auto_increment, - msg_image varchar(100) default NULL, - subject varchar(255) NOT NULL default '', - from_userid mediumint(8) unsigned NOT NULL default '0', - to_userid mediumint(8) unsigned NOT NULL default '0', - msg_time int(10) unsigned NOT NULL default '0', - msg_text text, - read_msg tinyint(1) unsigned NOT NULL default '0', - PRIMARY KEY (msg_id), - KEY to_userid (to_userid), - KEY touseridreadmsg (to_userid,read_msg), - KEY msgidfromuserid (from_userid, msg_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `ranks` -# - -CREATE TABLE ranks ( - rank_id smallint(5) unsigned NOT NULL auto_increment, - rank_title varchar(50) NOT NULL default '', - rank_min mediumint(8) unsigned NOT NULL default '0', - rank_max mediumint(8) unsigned NOT NULL default '0', - rank_special tinyint(1) unsigned NOT NULL default '0', - rank_image varchar(255) default NULL, - PRIMARY KEY (rank_id), - KEY rank_min (rank_min), - KEY rank_max (rank_max), - KEY rankminrankmaxranspecial (rank_min,rank_max,rank_special), - KEY rankspecial (rank_special) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `session` -# - -CREATE TABLE session ( - sess_id varchar(32) NOT NULL default '', - sess_updated int(10) unsigned NOT NULL default '0', - sess_ip varchar(15) NOT NULL default '', - sess_data text, - PRIMARY KEY (sess_id), - KEY updated (sess_updated) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `smiles` -# - -CREATE TABLE smiles ( - id smallint(5) unsigned NOT NULL auto_increment, - code varchar(50) NOT NULL default '', - smile_url varchar(100) NOT NULL default '', - emotion varchar(75) NOT NULL default '', - display tinyint(1) NOT NULL default '0', - PRIMARY KEY (id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `tplset` -# - -CREATE TABLE tplset ( - tplset_id int(7) unsigned NOT NULL auto_increment, - tplset_name varchar(50) NOT NULL default '', - tplset_desc varchar(255) NOT NULL default '', - tplset_credits text, - tplset_created int(10) unsigned NOT NULL default '0', - PRIMARY KEY (tplset_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `tplfile` -# - -CREATE TABLE tplfile ( - tpl_id mediumint(7) unsigned NOT NULL auto_increment, - tpl_refid smallint(5) unsigned NOT NULL default '0', - tpl_module varchar(25) NOT NULL default '', - tpl_tplset varchar(50) NOT NULL default '', - tpl_file varchar(50) NOT NULL default '', - tpl_desc varchar(255) NOT NULL default '', - tpl_lastmodified int(10) unsigned NOT NULL default '0', - tpl_lastimported int(10) unsigned NOT NULL default '0', - tpl_type varchar(20) NOT NULL default '', - PRIMARY KEY (tpl_id), - KEY tpl_refid (tpl_refid,tpl_type), - KEY tpl_tplset (tpl_tplset,tpl_file(10)) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `tplsource` -# - -CREATE TABLE tplsource ( - tpl_id mediumint(7) unsigned NOT NULL default '0', - tpl_source mediumtext, - KEY tpl_id (tpl_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# Table structure for table `users` -# - -CREATE TABLE users ( - uid mediumint(8) unsigned NOT NULL auto_increment, - name varchar(60) NOT NULL default '', - uname varchar(25) NOT NULL default '', - email varchar(60) NOT NULL default '', - url varchar(100) NOT NULL default '', - user_avatar varchar(30) NOT NULL default 'blank.gif', - user_regdate int(10) unsigned NOT NULL default '0', - user_icq varchar(15) NOT NULL default '', - user_from varchar(100) NOT NULL default '', - user_sig tinytext, - user_viewemail tinyint(1) unsigned NOT NULL default '0', - actkey varchar(8) NOT NULL default '', - user_aim varchar(18) NOT NULL default '', - user_yim varchar(25) NOT NULL default '', - user_msnm varchar(100) NOT NULL default '', - pass varchar(32) NOT NULL default '', - posts mediumint(8) unsigned NOT NULL default '0', - attachsig tinyint(1) unsigned NOT NULL default '0', - rank smallint(5) unsigned NOT NULL default '0', - level tinyint(3) unsigned NOT NULL default '1', - theme varchar(100) NOT NULL default '', - timezone_offset float(3,1) NOT NULL default '0.0', - last_login int(10) unsigned NOT NULL default '0', - umode varchar(10) NOT NULL default '', - uorder tinyint(1) unsigned NOT NULL default '0', - notify_method tinyint(1) NOT NULL default '1', - notify_mode tinyint(1) NOT NULL default '0', - user_occ varchar(100) NOT NULL default '', - bio tinytext, - user_intrest varchar(150) NOT NULL default '', - user_mailok tinyint(1) unsigned NOT NULL default '1', - PRIMARY KEY (uid), - KEY uname (uname), - KEY email (email), - KEY uiduname (uid,uname), - KEY unamepass (uname,pass), - KEY level (level) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `cache_model` -# - -CREATE TABLE cache_model ( - `cache_key` varchar(64) NOT NULL default '', - `cache_expires` int(10) unsigned NOT NULL default '0', - `cache_data` text, - - PRIMARY KEY (`cache_key`), - KEY `cache_expires` (`cache_expires`) -) ENGINE=MyISAM; -# -------------------------------------------------------- +# +# Table structure for table `avatar` +# + +CREATE TABLE avatar ( + avatar_id mediumint(8) unsigned NOT NULL auto_increment, + avatar_file varchar(30) NOT NULL default '', + avatar_name varchar(100) NOT NULL default '', + avatar_mimetype varchar(30) NOT NULL default '', + avatar_created int(10) NOT NULL default '0', + avatar_display tinyint(1) unsigned NOT NULL default '0', + avatar_weight smallint(5) unsigned NOT NULL default '0', + avatar_type char(1) NOT NULL default '', + PRIMARY KEY (avatar_id), + KEY avatar_type (avatar_type, avatar_display) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `avatar_user_link` +# + +CREATE TABLE avatar_user_link ( + avatar_id mediumint(8) unsigned NOT NULL default '0', + user_id mediumint(8) unsigned NOT NULL default '0', + KEY avatar_user_id (avatar_id,user_id) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `banner` +# + +CREATE TABLE banner ( + bid smallint(5) unsigned NOT NULL auto_increment, + cid tinyint(3) unsigned NOT NULL default '0', + imptotal mediumint(8) unsigned NOT NULL default '0', + impmade mediumint(8) unsigned NOT NULL default '0', + clicks mediumint(8) unsigned NOT NULL default '0', + imageurl varchar(255) NOT NULL default '', + clickurl varchar(255) NOT NULL default '', + datestart int(10) NOT NULL default '0', + dateend int(10) NOT NULL default '0', + htmlbanner tinyint(1) NOT NULL default '0', + htmlcode text, + status tinyint(1) NOT NULL default '0', + PRIMARY KEY (bid), + KEY idxbannercid (cid), + KEY idxbannerbidcid (bid,cid) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `bannerclient` +# + +CREATE TABLE bannerclient ( + cid smallint(5) unsigned NOT NULL auto_increment, + uid mediumint(8) unsigned NOT NULL default '0', + name varchar(60) NOT NULL default '', + extrainfo text, + PRIMARY KEY (cid), + KEY name (name) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `block_module_link` +# + +CREATE TABLE block_module_link ( + block_id mediumint(8) unsigned NOT NULL default '0', + module_id smallint(5) NOT NULL default '0', + PRIMARY KEY (`module_id`, `block_id`) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `comments` +# + +CREATE TABLE xoopscomments ( + com_id mediumint(8) unsigned NOT NULL auto_increment, + com_pid mediumint(8) unsigned NOT NULL default '0', + com_rootid mediumint(8) unsigned NOT NULL default '0', + com_modid smallint(5) unsigned NOT NULL default '0', + com_itemid mediumint(8) unsigned NOT NULL default '0', + com_icon varchar(25) NOT NULL default '', + com_created int(10) unsigned NOT NULL default '0', + com_modified int(10) unsigned NOT NULL default '0', + com_uid mediumint(8) unsigned NOT NULL default '0', + com_ip varchar(15) NOT NULL default '', + com_title varchar(255) NOT NULL default '', + com_text text, + com_sig tinyint(1) unsigned NOT NULL default '0', + com_status tinyint(1) unsigned NOT NULL default '0', + com_exparams varchar(255) NOT NULL default '', + dohtml tinyint(1) unsigned NOT NULL default '0', + dosmiley tinyint(1) unsigned NOT NULL default '0', + doxcode tinyint(1) unsigned NOT NULL default '0', + doimage tinyint(1) unsigned NOT NULL default '0', + dobr tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (com_id), + KEY com_pid (com_pid), + KEY com_itemid (com_itemid), + KEY com_uid (com_uid), + KEY com_title (com_title(40)), + KEY com_status (com_status) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# RMV-NOTIFY +# Table structure for table `notifications` +# + +CREATE TABLE xoopsnotifications ( + not_id mediumint(8) unsigned NOT NULL auto_increment, + not_modid smallint(5) unsigned NOT NULL default '0', + not_itemid mediumint(8) unsigned NOT NULL default '0', + not_category varchar(30) NOT NULL default '', + not_event varchar(30) NOT NULL default '', + not_uid mediumint(8) unsigned NOT NULL default '0', + not_mode tinyint(1) NOT NULL default 0, + PRIMARY KEY (not_id), + KEY not_modid (not_modid), + KEY not_itemid (not_itemid), + KEY not_class (not_category), + KEY not_uid (not_uid), + KEY not_event (not_event) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `config` +# + +CREATE TABLE config ( + conf_id smallint(5) unsigned NOT NULL auto_increment, + conf_modid smallint(5) unsigned NOT NULL default '0', + conf_catid smallint(5) unsigned NOT NULL default '0', + conf_name varchar(25) NOT NULL default '', + conf_title varchar(255) NOT NULL default '', + conf_value text, + conf_desc varchar(255) NOT NULL default '', + conf_formtype varchar(15) NOT NULL default '', + conf_valuetype varchar(10) NOT NULL default '', + conf_order smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (conf_id), + KEY conf_mod_cat_id (conf_modid, conf_catid), + KEY conf_order (conf_order) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `configcategory` +# + +CREATE TABLE configcategory ( + confcat_id smallint(5) unsigned NOT NULL auto_increment, + confcat_name varchar(255) NOT NULL default '', + confcat_order smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (confcat_id) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `configoption` +# + +CREATE TABLE configoption ( + confop_id mediumint(8) unsigned NOT NULL auto_increment, + confop_name varchar(255) NOT NULL default '', + confop_value varchar(255) NOT NULL default '', + conf_id smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (confop_id), + KEY conf_id (conf_id) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `groups` +# + +CREATE TABLE groups ( + groupid smallint(5) unsigned NOT NULL auto_increment, + name varchar(50) NOT NULL default '', + description text, + group_type varchar(10) NOT NULL default '', + + PRIMARY KEY (groupid), + KEY group_type (group_type) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `group_permission` +# + +CREATE TABLE group_permission ( + gperm_id int(10) unsigned NOT NULL auto_increment, + gperm_groupid smallint(5) unsigned NOT NULL default '0', + gperm_itemid mediumint(8) unsigned NOT NULL default '0', + gperm_modid mediumint(5) unsigned NOT NULL default '0', + gperm_name varchar(50) NOT NULL default '', + PRIMARY KEY (gperm_id), + KEY groupid (gperm_groupid), + KEY itemid (gperm_itemid), + KEY gperm_modid (gperm_modid,gperm_name(10)) +) ENGINE=MyISAM; +# -------------------------------------------------------- + + +# +# Table structure for table `groups_users_link` +# + +CREATE TABLE groups_users_link ( + linkid mediumint(8) unsigned NOT NULL auto_increment, + groupid smallint(5) unsigned NOT NULL default '0', + uid mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (linkid), + KEY groupid_uid (groupid,uid) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `image` +# + +CREATE TABLE image ( + image_id mediumint(8) unsigned NOT NULL auto_increment, + image_name varchar(30) NOT NULL default '', + image_nicename varchar(255) NOT NULL default '', + image_mimetype varchar(30) NOT NULL default '', + image_created int(10) unsigned NOT NULL default '0', + image_display tinyint(1) unsigned NOT NULL default '0', + image_weight smallint(5) unsigned NOT NULL default '0', + imgcat_id smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (image_id), + KEY imgcat_id (imgcat_id), + KEY image_display (image_display) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imagebody` +# + +CREATE TABLE imagebody ( + image_id mediumint(8) unsigned NOT NULL default '0', + image_body mediumblob, + KEY image_id (image_id) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imagecategory` +# + +CREATE TABLE imagecategory ( + imgcat_id smallint(5) unsigned NOT NULL auto_increment, + imgcat_name varchar(100) NOT NULL default '', + imgcat_maxsize int(8) unsigned NOT NULL default '0', + imgcat_maxwidth smallint(3) unsigned NOT NULL default '0', + imgcat_maxheight smallint(3) unsigned NOT NULL default '0', + imgcat_display tinyint(1) unsigned NOT NULL default '0', + imgcat_weight smallint(3) unsigned NOT NULL default '0', + imgcat_type char(1) NOT NULL default '', + imgcat_storetype varchar(5) NOT NULL default '', + PRIMARY KEY (imgcat_id), + KEY imgcat_display (imgcat_display) +) ENGINE=MyISAM; +# -------------------------------------------------------- + + +# +# Table structure for table `imgset` +# + +CREATE TABLE imgset ( + imgset_id smallint(5) unsigned NOT NULL auto_increment, + imgset_name varchar(50) NOT NULL default '', + imgset_refid mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (imgset_id), + KEY imgset_refid (imgset_refid) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imgset_tplset_link` +# + +CREATE TABLE imgset_tplset_link ( + imgset_id smallint(5) unsigned NOT NULL default '0', + tplset_name varchar(50) NOT NULL default '', + KEY tplset_name (tplset_name(10)) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imgsetimg` +# + +CREATE TABLE imgsetimg ( + imgsetimg_id mediumint(8) unsigned NOT NULL auto_increment, + imgsetimg_file varchar(50) NOT NULL default '', + imgsetimg_body blob, + imgsetimg_imgset smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (imgsetimg_id), + KEY imgsetimg_imgset (imgsetimg_imgset) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `modules` +# + +CREATE TABLE modules ( + mid smallint(5) unsigned NOT NULL auto_increment, + name varchar(150) NOT NULL default '', + version smallint(5) unsigned NOT NULL default '100', + last_update int(10) unsigned NOT NULL default '0', + weight smallint(3) unsigned NOT NULL default '0', + isactive tinyint(1) unsigned NOT NULL default '0', + dirname varchar(25) NOT NULL default '', + hasmain tinyint(1) unsigned NOT NULL default '0', + hasadmin tinyint(1) unsigned NOT NULL default '0', + hassearch tinyint(1) unsigned NOT NULL default '0', + hasconfig tinyint(1) unsigned NOT NULL default '0', + hascomments tinyint(1) unsigned NOT NULL default '0', + hasnotification tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (mid), + KEY hasmain (hasmain), + KEY hasadmin (hasadmin), + KEY hassearch (hassearch), + KEY hasnotification (hasnotification), + KEY dirname (dirname), + KEY name (name(15)), + KEY isactive (isactive), + KEY weight (weight), + KEY hascomments (hascomments) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `newblocks` +# + +CREATE TABLE newblocks ( + bid mediumint(8) unsigned NOT NULL auto_increment, + mid smallint(5) unsigned NOT NULL default '0', + func_num tinyint(3) unsigned NOT NULL default '0', + options varchar(255) NOT NULL default '', + name varchar(150) NOT NULL default '', + title varchar(255) NOT NULL default '', + content text, + side tinyint(1) unsigned NOT NULL default '0', + weight smallint(5) unsigned NOT NULL default '0', + visible tinyint(1) unsigned NOT NULL default '0', + block_type char(1) NOT NULL default '', + c_type char(1) NOT NULL default '', + isactive tinyint(1) unsigned NOT NULL default '0', + dirname varchar(50) NOT NULL default '', + func_file varchar(50) NOT NULL default '', + show_func varchar(50) NOT NULL default '', + edit_func varchar(50) NOT NULL default '', + template varchar(50) NOT NULL default '', + bcachetime int(10) unsigned NOT NULL default '0', + last_modified int(10) unsigned NOT NULL default '0', + PRIMARY KEY (bid), + KEY mid (mid), + KEY visible (visible), + KEY isactive_visible_mid (isactive,visible,mid), + KEY mid_funcnum (mid,func_num) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `online` +# + +CREATE TABLE online ( + online_uid mediumint(8) unsigned NOT NULL default '0', + online_uname varchar(25) NOT NULL default '', + online_updated int(10) unsigned NOT NULL default '0', + online_module smallint(5) unsigned NOT NULL default '0', + online_ip varchar(15) NOT NULL default '', + KEY online_module (online_module), + KEY online_updated (online_updated), + ... [truncated message content] |