Mini Market vel Marketplace Panel (marketplace_panel) - prosty sklep
|
Pieka |
Dodany dnia 21.02.2011 15:54:54
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
W załączniku znajdziecie Marketplace Panel v1.2 znany u nas jako Mini Market. Paczka tradycyjnie już zawiera polskie pliki językowe w standardach iso-8859-2 oraz utf-8.
Instalacja odbywa się jak każdej wtyczki, czyli:
- Wstawiamy katalog marketplace_panel do katalogu infusions na swoim serwerze.
- Przechodzimy do PA => Zarządzanie stroną => Wtyczki, wybieramy z listy Marketplace Panel i klikamy Instaluj.
- Następnie dodajemy nowy panel wybierając marketplace_panel, zapisujemy i włączamy.
Pieka dodał/a następującą plik:
Jestem jaki jestem
|
|
|
|
Wścibski Gość |
Dodany dnia 24.11.2024 18:53:06
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
Mario75 |
Dodany dnia 21.02.2011 15:57:28
|
Przedszkolak
Postów: 16 Ostrzeżeń: 2
Data rejestracji: 15.01.2011 17:20
|
1. PHP Fusion ver. v7.01.03 /następne pytanie będzie o stopkę, po uszkodzeniu serwera Kolegi otrzymałem pliki danych, które po złożeniu nie pokazują w stopce PHP Fusion itp również mojego licznika, ale nie o tym teraz mowa/
2. Zainstalowany mod: Mini Market 1.2
3. Ustawiłem tak, aby przycisk ze strony był niewidoczny dla gości. Docelowo chciałbym aby goście mogli przeglądać oferty, ale żeby nie mogli umieszczać ogłoszeń.
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: marketplace.php
| CVS Version: 1.00
| Author: Peter Bruggink
| Email:
+--------------------------------------------------------+
| v7 By Diemux
| http://www.phpfusion-mods.net
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
// If register_globals is turned off, extract super globals (php 4.2.0+)
if (ini_get('register_globals') != 1) {
if ((isset($_POST) == true) && (is_array($_POST) == true)) extract($_POST, EXTR_OVERWRITE);
if ((isset($_GET) == true) && (is_array($_GET) == true)) extract($_GET, EXTR_OVERWRITE);
}
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
include_once INCLUDES."bbcode_include.php";
include INFUSIONS."marketplace_panel/infusion_db.php";
if (file_exists(INFUSIONS."marketplace_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."marketplace_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."marketplace_panel/locale/English.php";
}
error_reporting(E_ALL ^ E_NOTICE);
function mailok($email) {
if ($email == "" || !preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $email)) {
return false;
}
return true;
}
if (isset($mplace_id) && !isNum($mplace_id)) redirect(FUSION_SELF);
if (!isset($action)) $action = "";
if ($action == "delete") {
if (iADMIN) {
$result = dbquery("DELETE FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$result = dbquery("DELETE FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='$mplace_id'");
redirect(FUSION_SELF);
}
}
if (isset($_POST['mplace_submit'])) {
$mplace_article = stripinput($_POST['mplace_article']);
$mplace_price = stripinput($_POST['mplace_price']);
$place_message = $_POST['mplace_message'];
if ($action == "edit") {
$result = dbquery("UPDATE ".DB_MARKETPLACE." SET mplace_article='$mplace_article', mplace_price='$mplace_price', mplace_message='$mplace_message' WHERE mplace_id='$mplace_id'");
} else {
$mplace_owner = $userdata['user_id'];
$mplace_datestamp = time();
$result = dbquery("INSERT INTO ".DB_MARKETPLACE." (mplace_owner, mplace_article, mplace_message, mplace_price, mplace_datestamp) VALUES('$mplace_owner', '$mplace_article', '$mplace_message', '$mplace_price', '$mplace_datestamp')");
}
redirect(FUSION_SELF);
}
if (isset($_POST['bidding_submit'])) {
$mplace_id = stripinput($_POST['mplace_id']);
$bidding_price = stripinput($_POST['bidding_price']);
$bidding_owner = $userdata['user_id'];
$bidding_date = time();
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE_BIDDING." WHERE bidding_owner='".$bidding_owner."' AND mplace_id='".$mplace_id."'");
$rows = dbrows($result);
if ($rows == 0) {
$result = dbquery("INSERT INTO ".DB_MARKETPLACE_BIDDING." (mplace_id, bidding_owner, bidding_price, bidding_date) VALUES('$mplace_id', '$bidding_owner', '$bidding_price', '$bidding_date')");
} else {
$result = dbquery("UPDATE ".DB_MARKETPLACE_BIDDING." SET bidding_price='$bidding_price', bidding_date='$bidding_date' WHERE bidding_owner='".$bidding_owner."' AND mplace_id='".$mplace_id."'");
}
redirect(FUSION_SELF);
}
if ($action == "close") {
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$data = dbarray($result);
if ($userdata['user_id'] == $data['mplace_owner']) {
$mailfrom = $userdata['user_email'];
$u_result = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$mplace_sold."'"));
if (mailok($u_result['user_email'])) {
$mailto = $u_result['user_email'];
$mailtype = "plain";
$mailsubject = "[".$data['mplace_article']."]";
$mailmessage = $locale['MPL700'].$data['mplace_article'].$locale['MPL701'].$bidding_price.$locale['MPL203']."\n";
$mailmessage .= $locale['MPL702']."\n\n";
require_once INCLUDES."sendmail_include.php";
sendemail($u_result['user_name'],$mailto,$userdata['user_name'],$mailfrom,$mailsubject,$mailmessage,$mailtype);
$result = dbquery("UPDATE ".DB_MARKETPLACE." SET mplace_sold='$mplace_sold' WHERE mplace_id='$mplace_id'");
}
}
redirect(FUSION_SELF);
}
//new
if ($action == "decline") {
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$data = dbarray($result);
if ($userdata['user_id'] == $data['mplace_owner']) {
$mailfrom = $userdata['user_email'];
$u_result = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$mplace_sold."'"));
if (mailok($u_result['user_email'])) {
$mailto = $u_result['user_email'];
$mailtype = "plain";
$mailsubject = "[".$data['mplace_article']."]";
$mailmessage = $locale['MPL700'].$data['mplace_article'].$locale['MPL704'].$bidding_price.$locale['MPL203']."\n";
$mailmessage .= $locale['MPL702']."\n\n";
require_once INCLUDES."sendmail_include.php";
sendemail($u_result['user_name'],$mailto,$userdata['user_name'],$mailfrom,$mailsubject,$mailmessage,$mailtype);
$result = dbquery("DELETE FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='$mplace_id'");
}
}
redirect(FUSION_SELF);
}
if ($action == "edit") {
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$data = dbarray($result);
if (dbrows($result) && (iADMIN || $userdata['user_id'] == $data['mplace_owner'])) {
$mplace_article = $data['mplace_article'];
$mplace_price = $data['mplace_price'];
$mplace_message = $data['mplace_message'];
$formaction = FUSION_SELF."?action=edit&mplace_id=$mplace_id";
} else {
$action = "";
$formaction = FUSION_SELF;
}
} else {
$mplace_article = "";
$mplace_price = "";
$mplace_message = $locale['MPL303'];
$formaction = FUSION_SELF;
}
if ($action == "new" || $action == "edit") {
opentable($locale['MPL300']);
echo "<form name='marketplace' method='post' action=$formaction>
<center><table border='0' cellpadding='0' cellspacing='0' summary=''>
<tr><td align='right' class='tbl'>".$locale['MPL301']."</td>
<td class='tbl'><input type='text' name='mplace_article' value='$mplace_article' class='textbox' size='25' maxlength='25' /></td>
<td align='right' class='tbl'>".$locale['MPL302']."</td>
<td class='tbl'><input type='text' name='mplace_price' value='$mplace_price' class='textbox' size='6' maxlength='6' /></td>
<td align='left' class='tbl'>".$locale['MPL203']."</td>
</tr>
<tr><td class='tbl' colspan='5'><textarea name='mplace_message' cols='43' rows='5' wrap='off'>$mplace_message</textarea><br /><br /></td>
</tr>
<tr>
<td class='tbl' colspan='5'>";
echo "<div class='tbl2' style='width:98%'>".display_bbcodes("99%", "mplace_message", "marketplace")."</div>\n";
echo"<input type='submit' name='mplace_submit' value='".$locale['MPL304']."' class='button' />
</td>
</tr>
</table></center>
</form>\n";
closetable();
//tablebreak();
}
if ($action == "make") {
$result = dbarray(dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'"));
$mplace_article = $result['mplace_article'];
$formaction = FUSION_SELF;
opentable($locale['MPL600']." [ ".$mplace_article." ]");
echo "<form name='biddingplace' method='post' action=$formaction>
<center><table border='0' cellpadding='0' cellspacing='0' summary=''>
<tr>
<td><input type='hidden' name='mplace_id' value='".$mplace_id."' /></td>
<td align='right' class='tbl'>".$locale['MPL601']."</td>
<td class='tbl'><input type='text' name='bidding_price' value='".$bidding_price."' class='textbox' size='6' maxlength='6' /></td>
<td align='left' class='tbl'>".$locale['MPL203']."</td>
</tr>
</tr>
<tr><td class='tbl' colspan='3'><input type='submit' name='bidding_submit' value='".$locale['MPL602']."' class='button' /></td>
</tr>
</table></center>
</form>\n";
closetable();
//tablebreak();
}
opentable($locale['MPL200']);
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE."");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
echo "<center>[ <a href='".FUSION_SELF."?action=new'>".$locale['MPL201']."</a> ]</center>\n";
tablebreak();
$i = 1;
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." ORDER BY mplace_datestamp DESC LIMIT $rowstart,10");
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$u_result = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$data['mplace_owner']."'"));
echo "<table align='center' cellpadding='0' cellspacing='1' width='80%' class='tbl-border'>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'><b>[ ".$data['mplace_article']." ]</b></td>
<td align='right' class='small'>".$locale['MPL202'].$data['mplace_price'].$locale['MPL203']."</td></tr>
</table>
</td>
</tr>
<tr>
<td class='tbl1'>".nl2br(parseubb(parsesmileys($data['mplace_message'])))."</td>
</tr>
<tr><td class='tbl1'>\n";
$b_result = dbquery("SELECT * FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='".$data['mplace_id']."'");
$b_rows = dbrows($b_result);
if ($b_rows != 0) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
$b_result = dbquery("SELECT * FROM ".DB_MARKETPLACE_BIDDING." LEFT JOIN ".$db_prefix."users
ON ".DB_MARKETPLACE_BIDDING.".bidding_owner=".$db_prefix."users.user_id
WHERE mplace_id='".$data['mplace_id']."' ORDER BY bidding_price");
while ($b_data = dbarray($b_result)) {
echo "<tr><td><img src='".THEME."images/bullet.gif' alt='' /> ".$b_data['bidding_price'].$locale['MPL203'].$locale['MPL501'].$b_data['user_name'];
if ($data['mplace_sold'] == $b_data['user_id']) {
echo $locale['MPL504']."</td>\n";
} else {
echo $locale['MPL502'].showdate("longdate", $b_data['bidding_date'])."</td>\n";
}
if (($userdata['user_id'] == $u_result['user_id']) && ($data['mplace_sold'] == 0)) {
echo "<td width='50' class='small' align='center'><a href='".FUSION_SELF."?action=close&mplace_id=".$data['mplace_id']."&mplace_sold=".$b_data['user_id']."&bidding_price=".$b_data['bidding_price']."'>".$locale['MPL503']."</a></td>\n";
//new
echo "<td width='50' class='small' align='center'><a href='".FUSION_SELF."?action=decline&mplace_id=".$data['mplace_id']."&mplace_sold=".$b_data['user_id']."&bidding_price=".$b_data['bidding_price']."'>".$locale['MPL505']."</a></td>\n";
} else {
echo "<td></td>\n";
}
echo "</tr>\n";
}
echo "</table></td>\n";
} else {
echo "<br /><center>".$locale['MPL500']."</td>\n";
}
echo "</tr>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'>".$locale['MPL204']."<b><a href='".BASEDIR."profile.php?lookup=".$u_result['user_id']."'>".$u_result['user_name']."</a></b>".$locale['MPL205']
.showdate("longdate", $data['mplace_datestamp'])."</td>
<td align='right' class='small'>\n";
if (iADMIN) {
echo "<a href='".FUSION_SELF."?action=delete&mplace_id=".$data['mplace_id']."'>".$locale['MPL206']."</a>";
}
if ($data['mplace_sold'] == 0) {
echo " | ";
if ($userdata['user_id'] == $u_result['user_id']) {
echo "<a href='".FUSION_SELF."?action=edit&mplace_id=".$data['mplace_id']."'>".$locale['MPL207']."</a> | ";
}
echo "<a href='".FUSION_SELF."?action=make&mplace_id=".$data['mplace_id']."'>".$locale['MPL208']."</a></td></tr>\n";
}
echo "</table>
</td>
</tr>
</table>\n";
if ($i != $numrows) echo "<br />\n";
$i++;
}
} else {
echo "<center><br />\n".$locale['MPL209']."<br /><br />\n[ <a href='".FUSION_SELF."?action=new'>".$locale['MPL201']."</a> ]<br /><br />\n</center>\n";
}
closetable();
if ($rows != 0) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,10,$rows,3,FUSION_SELF."?")."\n</div>\n";
require_once THEMES."templates/footer.php";
?>
EDIT: Pieki pomoc nieoceniona, ale jestem nowy i nie wiem jak przerobić Kolegi skrypt na ten działający pod nowym PHP Fusionem :(
PW od moderatora:
- Przeniesienie posta - Chemikpil 16.02 - 16:00
- Brak Stopki! - Chemikpil 16.02 - 20:39
- Przeniesienie posta - Pieka 21.02 - 15:57
Edytowane przez Mario75 dnia 16.02.2011 15:36:08
|
|
|
|
Smok-Wiatru |
Dodany dnia 21.02.2011 15:58:16
|
Przedszkolak
Postów: 53 Pomógł: 1 Ostrzeżeń: 3
v7.01.01 Data rejestracji: 01.07.2010 19:08
ZBANOWANY: Dożywotnio
|
Mario75 napisał/a:
1. PHP Fusion ver. v7.01.03 /następne pytanie będzie o stopkę, po uszkodzeniu serwera Kolegi otrzymałem pliki danych, które po złożeniu nie pokazują w stopce PHP Fusion itp również mojego licznika, ale nie o tym teraz mowa/
2. Zainstalowany mod: Mini Market 1.2
3. Ustawiłem tak, aby przycisk ze strony był niewidoczny dla gości. Docelowo chciałbym aby goście mogli przeglądać oferty, ale żeby nie mogli umieszczać ogłoszeń.
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: marketplace.php
| CVS Version: 1.00
| Author: Peter Bruggink
| Email:
+--------------------------------------------------------+
| v7 By Diemux
| http://www.phpfusion-mods.net
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
// If register_globals is turned off, extract super globals (php 4.2.0+)
if (ini_get('register_globals') != 1) {
if ((isset($_POST) == true) && (is_array($_POST) == true)) extract($_POST, EXTR_OVERWRITE);
if ((isset($_GET) == true) && (is_array($_GET) == true)) extract($_GET, EXTR_OVERWRITE);
}
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
include_once INCLUDES."bbcode_include.php";
include INFUSIONS."marketplace_panel/infusion_db.php";
if (file_exists(INFUSIONS."marketplace_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."marketplace_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."marketplace_panel/locale/English.php";
}
error_reporting(E_ALL ^ E_NOTICE);
function mailok($email) {
if ($email == "" || !preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $email)) {
return false;
}
return true;
}
if (isset($mplace_id) && !isNum($mplace_id)) redirect(FUSION_SELF);
if (!isset($action)) $action = "";
if ($action == "delete") {
if (iADMIN) {
$result = dbquery("DELETE FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$result = dbquery("DELETE FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='$mplace_id'");
redirect(FUSION_SELF);
}
}
if (isset($_POST['mplace_submit'])) {
$mplace_article = stripinput($_POST['mplace_article']);
$mplace_price = stripinput($_POST['mplace_price']);
$place_message = $_POST['mplace_message'];
if ($action == "edit") {
$result = dbquery("UPDATE ".DB_MARKETPLACE." SET mplace_article='$mplace_article', mplace_price='$mplace_price', mplace_message='$mplace_message' WHERE mplace_id='$mplace_id'");
} else {
$mplace_owner = $userdata['user_id'];
$mplace_datestamp = time();
$result = dbquery("INSERT INTO ".DB_MARKETPLACE." (mplace_owner, mplace_article, mplace_message, mplace_price, mplace_datestamp) VALUES('$mplace_owner', '$mplace_article', '$mplace_message', '$mplace_price', '$mplace_datestamp')");
}
redirect(FUSION_SELF);
}
if (isset($_POST['bidding_submit'])) {
$mplace_id = stripinput($_POST['mplace_id']);
$bidding_price = stripinput($_POST['bidding_price']);
$bidding_owner = $userdata['user_id'];
$bidding_date = time();
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE_BIDDING." WHERE bidding_owner='".$bidding_owner."' AND mplace_id='".$mplace_id."'");
$rows = dbrows($result);
if ($rows == 0) {
$result = dbquery("INSERT INTO ".DB_MARKETPLACE_BIDDING." (mplace_id, bidding_owner, bidding_price, bidding_date) VALUES('$mplace_id', '$bidding_owner', '$bidding_price', '$bidding_date')");
} else {
$result = dbquery("UPDATE ".DB_MARKETPLACE_BIDDING." SET bidding_price='$bidding_price', bidding_date='$bidding_date' WHERE bidding_owner='".$bidding_owner."' AND mplace_id='".$mplace_id."'");
}
redirect(FUSION_SELF);
}
if ($action == "close") {
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$data = dbarray($result);
if ($userdata['user_id'] == $data['mplace_owner']) {
$mailfrom = $userdata['user_email'];
$u_result = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$mplace_sold."'"));
if (mailok($u_result['user_email'])) {
$mailto = $u_result['user_email'];
$mailtype = "plain";
$mailsubject = "[".$data['mplace_article']."]";
$mailmessage = $locale['MPL700'].$data['mplace_article'].$locale['MPL701'].$bidding_price.$locale['MPL203']."\n";
$mailmessage .= $locale['MPL702']."\n\n";
require_once INCLUDES."sendmail_include.php";
sendemail($u_result['user_name'],$mailto,$userdata['user_name'],$mailfrom,$mailsubject,$mailmessage,$mailtype);
$result = dbquery("UPDATE ".DB_MARKETPLACE." SET mplace_sold='$mplace_sold' WHERE mplace_id='$mplace_id'");
}
}
redirect(FUSION_SELF);
}
//new
if ($action == "decline") {
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$data = dbarray($result);
if ($userdata['user_id'] == $data['mplace_owner']) {
$mailfrom = $userdata['user_email'];
$u_result = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$mplace_sold."'"));
if (mailok($u_result['user_email'])) {
$mailto = $u_result['user_email'];
$mailtype = "plain";
$mailsubject = "[".$data['mplace_article']."]";
$mailmessage = $locale['MPL700'].$data['mplace_article'].$locale['MPL704'].$bidding_price.$locale['MPL203']."\n";
$mailmessage .= $locale['MPL702']."\n\n";
require_once INCLUDES."sendmail_include.php";
sendemail($u_result['user_name'],$mailto,$userdata['user_name'],$mailfrom,$mailsubject,$mailmessage,$mailtype);
$result = dbquery("DELETE FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='$mplace_id'");
}
}
redirect(FUSION_SELF);
}
if ($action == "edit") {
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$data = dbarray($result);
if (dbrows($result) && (iADMIN || $userdata['user_id'] == $data['mplace_owner'])) {
$mplace_article = $data['mplace_article'];
$mplace_price = $data['mplace_price'];
$mplace_message = $data['mplace_message'];
$formaction = FUSION_SELF."?action=edit&mplace_id=$mplace_id";
} else {
$action = "";
$formaction = FUSION_SELF;
}
} else {
$mplace_article = "";
$mplace_price = "";
$mplace_message = $locale['MPL303'];
$formaction = FUSION_SELF;
}
if ($action == "new" || $action == "edit") {
opentable($locale['MPL300']);
echo "<form name='marketplace' method='post' action=$formaction>
<center><table border='0' cellpadding='0' cellspacing='0' summary=''>
<tr><td align='right' class='tbl'>".$locale['MPL301']."</td>
<td class='tbl'><input type='text' name='mplace_article' value='$mplace_article' class='textbox' size='25' maxlength='25' /></td>
<td align='right' class='tbl'>".$locale['MPL302']."</td>
<td class='tbl'><input type='text' name='mplace_price' value='$mplace_price' class='textbox' size='6' maxlength='6' /></td>
<td align='left' class='tbl'>".$locale['MPL203']."</td>
</tr>
<tr><td class='tbl' colspan='5'><textarea name='mplace_message' cols='43' rows='5' wrap='off'>$mplace_message</textarea><br /><br /></td>
</tr>
<tr>
<td class='tbl' colspan='5'>";
echo "<div class='tbl2' style='width:98%'>".display_bbcodes("99%", "mplace_message", "marketplace")."</div>\n";
echo"<input type='submit' name='mplace_submit' value='".$locale['MPL304']."' class='button' />
</td>
</tr>
</table></center>
</form>\n";
closetable();
//tablebreak();
}
if ($action == "make") {
$result = dbarray(dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'"));
$mplace_article = $result['mplace_article'];
$formaction = FUSION_SELF;
opentable($locale['MPL600']." [ ".$mplace_article." ]");
echo "<form name='biddingplace' method='post' action=$formaction>
<center><table border='0' cellpadding='0' cellspacing='0' summary=''>
<tr>
<td><input type='hidden' name='mplace_id' value='".$mplace_id."' /></td>
<td align='right' class='tbl'>".$locale['MPL601']."</td>
<td class='tbl'><input type='text' name='bidding_price' value='".$bidding_price."' class='textbox' size='6' maxlength='6' /></td>
<td align='left' class='tbl'>".$locale['MPL203']."</td>
</tr>
</tr>
<tr><td class='tbl' colspan='3'><input type='submit' name='bidding_submit' value='".$locale['MPL602']."' class='button' /></td>
</tr>
</table></center>
</form>\n";
closetable();
//tablebreak();
}
opentable($locale['MPL200']);
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE."");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
if (iMEMBER)
{
echo "<center>[ <a href='".FUSION_SELF."?action=new'>".$locale['MPL201']."</a> ]</center>\n";
}
tablebreak();
$i = 1;
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." ORDER BY mplace_datestamp DESC LIMIT $rowstart,10");
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$u_result = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$data['mplace_owner']."'"));
echo "<table align='center' cellpadding='0' cellspacing='1' width='80%' class='tbl-border'>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'><b>[ ".$data['mplace_article']." ]</b></td>
<td align='right' class='small'>".$locale['MPL202'].$data['mplace_price'].$locale['MPL203']."</td></tr>
</table>
</td>
</tr>
<tr>
<td class='tbl1'>".nl2br(parseubb(parsesmileys($data['mplace_message'])))."</td>
</tr>
<tr><td class='tbl1'>\n";
$b_result = dbquery("SELECT * FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='".$data['mplace_id']."'");
$b_rows = dbrows($b_result);
if ($b_rows != 0) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
$b_result = dbquery("SELECT * FROM ".DB_MARKETPLACE_BIDDING." LEFT JOIN ".$db_prefix."users
ON ".DB_MARKETPLACE_BIDDING.".bidding_owner=".$db_prefix."users.user_id
WHERE mplace_id='".$data['mplace_id']."' ORDER BY bidding_price");
while ($b_data = dbarray($b_result)) {
echo "<tr><td><img src='".THEME."images/bullet.gif' alt='' /> ".$b_data['bidding_price'].$locale['MPL203'].$locale['MPL501'].$b_data['user_name'];
if ($data['mplace_sold'] == $b_data['user_id']) {
echo $locale['MPL504']."</td>\n";
} else {
echo $locale['MPL502'].showdate("longdate", $b_data['bidding_date'])."</td>\n";
}
if (($userdata['user_id'] == $u_result['user_id']) && ($data['mplace_sold'] == 0)) {
echo "<td width='50' class='small' align='center'><a href='".FUSION_SELF."?action=close&mplace_id=".$data['mplace_id']."&mplace_sold=".$b_data['user_id']."&bidding_price=".$b_data['bidding_price']."'>".$locale['MPL503']."</a></td>\n";
//new
echo "<td width='50' class='small' align='center'><a href='".FUSION_SELF."?action=decline&mplace_id=".$data['mplace_id']."&mplace_sold=".$b_data['user_id']."&bidding_price=".$b_data['bidding_price']."'>".$locale['MPL505']."</a></td>\n";
} else {
echo "<td></td>\n";
}
echo "</tr>\n";
}
echo "</table></td>\n";
} else {
echo "<br /><center>".$locale['MPL500']."</td>\n";
}
echo "</tr>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'>".$locale['MPL204']."<b><a href='".BASEDIR."profile.php?lookup=".$u_result['user_id']."'>".$u_result['user_name']."</a></b>".$locale['MPL205']
.showdate("longdate", $data['mplace_datestamp'])."</td>
<td align='right' class='small'>\n";
if (iADMIN) {
echo "<a href='".FUSION_SELF."?action=delete&mplace_id=".$data['mplace_id']."'>".$locale['MPL206']."</a>";
}
if ($data['mplace_sold'] == 0) {
echo " | ";
if ($userdata['user_id'] == $u_result['user_id']) {
echo "<a href='".FUSION_SELF."?action=edit&mplace_id=".$data['mplace_id']."'>".$locale['MPL207']."</a> | ";
}
echo "<a href='".FUSION_SELF."?action=make&mplace_id=".$data['mplace_id']."'>".$locale['MPL208']."</a></td></tr>\n";
}
echo "</table>
</td>
</tr>
</table>\n";
if ($i != $numrows) echo "<br />\n";
$i++;
}
} else {
echo "<center><br />\n".$locale['MPL209']."<br /><br />\n[ <a href='".FUSION_SELF."?action=new'>".$locale['MPL201']."</a> ]<br /><br />\n</center>\n";
}
closetable();
if ($rows != 0) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,10,$rows,3,FUSION_SELF."?")."\n</div>\n";
require_once THEMES."templates/footer.php";
?>
EDIT: Pieki pomoc nieoceniona, ale jestem nowy i nie wiem jak przerobić Kolegi skrypt na ten działający pod nowym PHP Fusionem :(
Przycisk powinien być widoczny tylko dla użytkowników.
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: marketplace.php
| CVS Version: 1.00
| Author: Peter Bruggink
| Email:
+--------------------------------------------------------+
| v7 By Diemux
| http://www.phpfusion-mods.net
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
// If register_globals is turned off, extract super globals (php 4.2.0+)
if (ini_get('register_globals') != 1) {
if ((isset($_POST) == true) && (is_array($_POST) == true)) extract($_POST, EXTR_OVERWRITE);
if ((isset($_GET) == true) && (is_array($_GET) == true)) extract($_GET, EXTR_OVERWRITE);
}
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
include_once INCLUDES."bbcode_include.php";
include INFUSIONS."marketplace_panel/infusion_db.php";
if (file_exists(INFUSIONS."marketplace_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."marketplace_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."marketplace_panel/locale/English.php";
}
error_reporting(E_ALL ^ E_NOTICE);
function mailok($email) {
if ($email == "" || !preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $email)) {
return false;
}
return true;
}
if (isset($mplace_id) && !isNum($mplace_id)) redirect(FUSION_SELF);
if (!isset($action)) $action = "";
if ($action == "delete") {
if (iADMIN) {
$result = dbquery("DELETE FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$result = dbquery("DELETE FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='$mplace_id'");
redirect(FUSION_SELF);
}
}
if (isset($_POST['mplace_submit'])) {
$mplace_article = stripinput($_POST['mplace_article']);
$mplace_price = stripinput($_POST['mplace_price']);
$place_message = $_POST['mplace_message'];
if ($action == "edit") {
$result = dbquery("UPDATE ".DB_MARKETPLACE." SET mplace_article='$mplace_article', mplace_price='$mplace_price', mplace_message='$mplace_message' WHERE mplace_id='$mplace_id'");
} else {
$mplace_owner = $userdata['user_id'];
$mplace_datestamp = time();
$result = dbquery("INSERT INTO ".DB_MARKETPLACE." (mplace_owner, mplace_article, mplace_message, mplace_price, mplace_datestamp) VALUES('$mplace_owner', '$mplace_article', '$mplace_message', '$mplace_price', '$mplace_datestamp')");
}
redirect(FUSION_SELF);
}
if (isset($_POST['bidding_submit'])) {
$mplace_id = stripinput($_POST['mplace_id']);
$bidding_price = stripinput($_POST['bidding_price']);
$bidding_owner = $userdata['user_id'];
$bidding_date = time();
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE_BIDDING." WHERE bidding_owner='".$bidding_owner."' AND mplace_id='".$mplace_id."'");
$rows = dbrows($result);
if ($rows == 0) {
$result = dbquery("INSERT INTO ".DB_MARKETPLACE_BIDDING." (mplace_id, bidding_owner, bidding_price, bidding_date) VALUES('$mplace_id', '$bidding_owner', '$bidding_price', '$bidding_date')");
} else {
$result = dbquery("UPDATE ".DB_MARKETPLACE_BIDDING." SET bidding_price='$bidding_price', bidding_date='$bidding_date' WHERE bidding_owner='".$bidding_owner."' AND mplace_id='".$mplace_id."'");
}
redirect(FUSION_SELF);
}
if ($action == "close") {
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$data = dbarray($result);
if ($userdata['user_id'] == $data['mplace_owner']) {
$mailfrom = $userdata['user_email'];
$u_result = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$mplace_sold."'"));
if (mailok($u_result['user_email'])) {
$mailto = $u_result['user_email'];
$mailtype = "plain";
$mailsubject = "[".$data['mplace_article']."]";
$mailmessage = $locale['MPL700'].$data['mplace_article'].$locale['MPL701'].$bidding_price.$locale['MPL203']."\n";
$mailmessage .= $locale['MPL702']."\n\n";
require_once INCLUDES."sendmail_include.php";
sendemail($u_result['user_name'],$mailto,$userdata['user_name'],$mailfrom,$mailsubject,$mailmessage,$mailtype);
$result = dbquery("UPDATE ".DB_MARKETPLACE." SET mplace_sold='$mplace_sold' WHERE mplace_id='$mplace_id'");
}
}
redirect(FUSION_SELF);
}
//new
if ($action == "decline") {
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$data = dbarray($result);
if ($userdata['user_id'] == $data['mplace_owner']) {
$mailfrom = $userdata['user_email'];
$u_result = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$mplace_sold."'"));
if (mailok($u_result['user_email'])) {
$mailto = $u_result['user_email'];
$mailtype = "plain";
$mailsubject = "[".$data['mplace_article']."]";
$mailmessage = $locale['MPL700'].$data['mplace_article'].$locale['MPL704'].$bidding_price.$locale['MPL203']."\n";
$mailmessage .= $locale['MPL702']."\n\n";
require_once INCLUDES."sendmail_include.php";
sendemail($u_result['user_name'],$mailto,$userdata['user_name'],$mailfrom,$mailsubject,$mailmessage,$mailtype);
$result = dbquery("DELETE FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='$mplace_id'");
}
}
redirect(FUSION_SELF);
}
if ($action == "edit") {
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'");
$data = dbarray($result);
if (dbrows($result) && (iADMIN || $userdata['user_id'] == $data['mplace_owner'])) {
$mplace_article = $data['mplace_article'];
$mplace_price = $data['mplace_price'];
$mplace_message = $data['mplace_message'];
$formaction = FUSION_SELF."?action=edit&mplace_id=$mplace_id";
} else {
$action = "";
$formaction = FUSION_SELF;
}
} else {
$mplace_article = "";
$mplace_price = "";
$mplace_message = $locale['MPL303'];
$formaction = FUSION_SELF;
}
if ($action == "new" || $action == "edit") {
opentable($locale['MPL300']);
echo "<form name='marketplace' method='post' action=$formaction>
<center><table border='0' cellpadding='0' cellspacing='0' summary=''>
<tr><td align='right' class='tbl'>".$locale['MPL301']."</td>
<td class='tbl'><input type='text' name='mplace_article' value='$mplace_article' class='textbox' size='25' maxlength='25' /></td>
<td align='right' class='tbl'>".$locale['MPL302']."</td>
<td class='tbl'><input type='text' name='mplace_price' value='$mplace_price' class='textbox' size='6' maxlength='6' /></td>
<td align='left' class='tbl'>".$locale['MPL203']."</td>
</tr>
<tr><td class='tbl' colspan='5'><textarea name='mplace_message' cols='43' rows='5' wrap='off'>$mplace_message</textarea><br /><br /></td>
</tr>
<tr>
<td class='tbl' colspan='5'>";
echo "<div class='tbl2' style='width:98%'>".display_bbcodes("99%", "mplace_message", "marketplace")."</div>\n";
echo"<input type='submit' name='mplace_submit' value='".$locale['MPL304']."' class='button' />
</td>
</tr>
</table></center>
</form>\n";
closetable();
//tablebreak();
}
if ($action == "make") {
$result = dbarray(dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_id='$mplace_id'"));
$mplace_article = $result['mplace_article'];
$formaction = FUSION_SELF;
opentable($locale['MPL600']." [ ".$mplace_article." ]");
echo "<form name='biddingplace' method='post' action=$formaction>
<center><table border='0' cellpadding='0' cellspacing='0' summary=''>
<tr>
<td><input type='hidden' name='mplace_id' value='".$mplace_id."' /></td>
<td align='right' class='tbl'>".$locale['MPL601']."</td>
<td class='tbl'><input type='text' name='bidding_price' value='".$bidding_price."' class='textbox' size='6' maxlength='6' /></td>
<td align='left' class='tbl'>".$locale['MPL203']."</td>
</tr>
</tr>
<tr><td class='tbl' colspan='3'><input type='submit' name='bidding_submit' value='".$locale['MPL602']."' class='button' /></td>
</tr>
</table></center>
</form>\n";
closetable();
//tablebreak();
}
opentable($locale['MPL200']);
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE."");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
if (iMEMBER)
{
echo "<center>[ <a href='".FUSION_SELF."?action=new'>".$locale['MPL201']."</a> ]</center>\n";
}
tablebreak();
$i = 1;
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." ORDER BY mplace_datestamp DESC LIMIT $rowstart,10");
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$u_result = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$data['mplace_owner']."'"));
echo "<table align='center' cellpadding='0' cellspacing='1' width='80%' class='tbl-border'>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'><b>[ ".$data['mplace_article']." ]</b></td>
<td align='right' class='small'>".$locale['MPL202'].$data['mplace_price'].$locale['MPL203']."</td></tr>
</table>
</td>
</tr>
<tr>
<td class='tbl1'>".nl2br(parseubb(parsesmileys($data['mplace_message'])))."</td>
</tr>
<tr><td class='tbl1'>\n";
$b_result = dbquery("SELECT * FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='".$data['mplace_id']."'");
$b_rows = dbrows($b_result);
if ($b_rows != 0) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
$b_result = dbquery("SELECT * FROM ".DB_MARKETPLACE_BIDDING." LEFT JOIN ".$db_prefix."users
ON ".DB_MARKETPLACE_BIDDING.".bidding_owner=".$db_prefix."users.user_id
WHERE mplace_id='".$data['mplace_id']."' ORDER BY bidding_price");
while ($b_data = dbarray($b_result)) {
echo "<tr><td><img src='".THEME."images/bullet.gif' alt='' /> ".$b_data['bidding_price'].$locale['MPL203'].$locale['MPL501'].$b_data['user_name'];
if ($data['mplace_sold'] == $b_data['user_id']) {
echo $locale['MPL504']."</td>\n";
} else {
echo $locale['MPL502'].showdate("longdate", $b_data['bidding_date'])."</td>\n";
}
if (($userdata['user_id'] == $u_result['user_id']) && ($data['mplace_sold'] == 0)) {
echo "<td width='50' class='small' align='center'><a href='".FUSION_SELF."?action=close&mplace_id=".$data['mplace_id']."&mplace_sold=".$b_data['user_id']."&bidding_price=".$b_data['bidding_price']."'>".$locale['MPL503']."</a></td>\n";
//new
echo "<td width='50' class='small' align='center'><a href='".FUSION_SELF."?action=decline&mplace_id=".$data['mplace_id']."&mplace_sold=".$b_data['user_id']."&bidding_price=".$b_data['bidding_price']."'>".$locale['MPL505']."</a></td>\n";
} else {
echo "<td></td>\n";
}
echo "</tr>\n";
}
echo "</table></td>\n";
} else {
echo "<br /><center>".$locale['MPL500']."</td>\n";
}
echo "</tr>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'>".$locale['MPL204']."<b><a href='".BASEDIR."profile.php?lookup=".$u_result['user_id']."'>".$u_result['user_name']."</a></b>".$locale['MPL205']
.showdate("longdate", $data['mplace_datestamp'])."</td>
<td align='right' class='small'>\n";
if (iADMIN) {
echo "<a href='".FUSION_SELF."?action=delete&mplace_id=".$data['mplace_id']."'>".$locale['MPL206']."</a>";
}
if ($data['mplace_sold'] == 0) {
echo " | ";
if ($userdata['user_id'] == $u_result['user_id']) {
echo "<a href='".FUSION_SELF."?action=edit&mplace_id=".$data['mplace_id']."'>".$locale['MPL207']."</a> | ";
}
echo "<a href='".FUSION_SELF."?action=make&mplace_id=".$data['mplace_id']."'>".$locale['MPL208']."</a></td></tr>\n";
}
echo "</table>
</td>
</tr>
</table>\n";
if ($i != $numrows) echo "<br />\n";
$i++;
}
} else {
echo "<center><br />\n".$locale['MPL209']."<br /><br />\n[ <a href='".FUSION_SELF."?action=new'>".$locale['MPL201']."</a> ]<br /><br />\n</center>\n";
}
closetable();
if ($rows != 0) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,10,$rows,3,FUSION_SELF."?")."\n</div>\n";
require_once THEMES."templates/footer.php";
?>
PW od moderatora:
- Przeniesienie posta - Pieka 21.02 - 15:58
- Brak Stopki! - Pieka 05.03 - 14:27
|
|
|
|
Mario75 |
Dodany dnia 21.02.2011 15:59:01
|
Przedszkolak
Postów: 16 Ostrzeżeń: 2
Data rejestracji: 15.01.2011 17:20
|
Smok-Wiatru skopiowałem zawartość Twojego kodu źródłowego w całości i podmieniłem u siebie. Niestety nadal jest ten sam problem. Przycisk do marketplace jest ukryty dla gości. Mając jednak link bezpośredni http://www.asgpol...tplace.php
goście mogą nadal dodawać ogłoszenia.
PW od moderatora:
- Przeniesienie posta - Pieka 21.02 - 15:59
|
|
|
|
Pieka |
Dodany dnia 21.02.2011 15:59:42
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
W zalaczniku znajdziesz plik, ktory powinien spelnic Twoje oczekiwania. Powinno byc wszystko OK.
PW od moderatora:
- Przeniesienie posta - Pieka 21.02 - 15:59
Pieka dodał/a następującą plik:
Jestem jaki jestem
|
|
|
|
Mario75 |
Dodany dnia 21.02.2011 16:00:18
|
Przedszkolak
Postów: 16 Ostrzeżeń: 2
Data rejestracji: 15.01.2011 17:20
|
Pieka jak zwykle rozwiązał problem. Dziękuję.
EDIT:
Czy ktoś wie gdzie znaleźć parametr odpowiedzialny za ilość wyświetlanych Ofert na stronie. Chciałbym zwiększyć tą ilość. W tym momencie mieści się 10 Ogłoszeń. Myślę, żeby zmienić na 25 Ogłoszeń.
PW od moderatora:
- Przeniesienie posta - Pieka 21.02 - 16:00
Edytowane przez Mario75 dnia 23.02.2011 15:02:25
|
|
|
|
Pieka |
Dodany dnia 23.02.2011 15:21:30
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Mario75 napisał/a:
...Czy ktoś wie gdzie znaleźć parametr odpowiedzialny za ilość wyświetlanych Ofert na stronie. Chciałbym zwiększyć tą ilość. W tym momencie mieści się 10 Ogłoszeń. Myślę, żeby zmienić na 25 Ogłoszeń.
W dwoch liniach pliku marketplace.php musisz zmienic wartosc 10 na 25:
- Linia 212:
$result = dbquery("SELECT * FROM ".DB_MARKETPLACE." ORDER BY mplace_datestamp DESC LIMIT $rowstart,10");
- Linia 288:
if ($rows != 0) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,10,$rows,3,FUSION_SELF."?")."\n</div>\n";
PS Kolejne zaczepki przez PW zaowocuja czyms zupelnie przeciwnym do pomocy.
Jestem jaki jestem
|
|
|
|
Mario75 |
Dodany dnia 24.02.2011 15:29:17
|
Przedszkolak
Postów: 16 Ostrzeżeń: 2
Data rejestracji: 15.01.2011 17:20
|
Zbierałem opinie użytkowników i mam w związku z tym pytanie. Czy możne ktoś ma pomysł na to aby Ogłoszenia w Marketplace wyglądały tak jak poniżej:
W ogłoszeniu widać by było ograniczony ilością znaków tekst i można by było wstawić niewielki obrazek lub w ogóle sam tekst bez zdjęcia. Po czym klikając na "czytaj więcej" lub "pokaż więcej" otworzyłaby się podstrona z miejscem nielimitowanym na prezentację towaru.
Podobnie jak ma to miejsce w przypadku Zamieszczania News. W ten sposób w Marketpace nadal będą mogli ludzie wystawiać za darmo zalegające w szafach rzeczy, widzieć po wejściu licytację i licytować, oraz widzieć za ile i co się sprzedaje. Jednak chcąc zobaczyć pełniejszy opis wejdą w "pokaż więcej" i doczytają. Spowoduje to zwiększenie ilości ofert na stronę, szybsze ładowanie strony z ofertami, oraz zlikwiduje uciążliwe przewijanie się przez długie oferty z dużą ilością zdjęć i tekstu.
Edytowane przez Mario75 dnia 24.02.2011 15:41:08
|
|
|
|
nightcom79 |
Dodany dnia 06.03.2011 18:03:14
|
Przedszkolak
Postów: 12 Pomógł: 1
Data rejestracji: 09.01.2011 19:34
|
Czy jest ktoś chętny aby wprowadzić w Mini Market działy? Np. kupię, sprzedam, zamienię.
Edytowane przez nightcom79 dnia 06.03.2011 18:03:40
|
|
|
|
Naziun |
Dodany dnia 06.03.2011 20:41:54
|
Przedszkolak
Postów: 6
Data rejestracji: 18.12.2010 22:16
|
Mógłby ktoś podac link dodawania artykułów do tego panelu? |
|
|
|
krystian1988 |
Dodany dnia 06.03.2011 20:46:45
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
Przecież jest to w tej wtyczce, ale masz:
http://www.twoja_strona.pl/infusions/marketplace_panel/marketplace.php?action=new
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
Naziun |
Dodany dnia 06.03.2011 20:54:32
|
Przedszkolak
Postów: 6
Data rejestracji: 18.12.2010 22:16
|
Dziękuję bardzo. |
|
|
|
Reqest |
Dodany dnia 01.01.2013 02:56:53
|
Przedszkolak
Postów: 41 Pomógł: 4 Ostrzeżeń: 3
Data rejestracji: 24.05.2006 10:56
|
Wspominano o kategoriach itp.
Dokładam inne możliwości na gwiazdkę :)
- zakupy poprzez KUP TERAZ bez licytacji
- dodawanie zdjęcia przy dodawaniu ogłoszenia
- wybór kategorii: kup , sprzedaj, zamień
- określenie czasu trwania ogłoszenia
Wprowadzone zmiany:
- użycie funkcji sendmail
- miniaturka zdjęcia w panelu
Są jeszcze inne zmiany, ale uważałem je za dopasowane tylko dla moich potrzeb, więc ich nie includowałem.
Pozdrawiam. Do Siego Roku!
Połączony z 28 luty 2013 00:04:
Nie wiem czy ktoś odczuł usterkę, ale opiszę co trzeba zrobić (dla osób, które mają już zainstalowaną paczkę).
W pliku marketplace_panel.php w funkcji usuwania anonsów po czasie:
Należy usunąć poniższy fragment kodu
//usuwanie zakończonych anonsów
$poz=60*86400;
$poz1=$data['mplace_datestamp']+$poz;
$poz2=time()-$poz1;
$poz3=$poz2/86400-1;
if(poz3==0) {
$result = dbquery("DELETE FROM ".DB_MARKETPLACE." WHERE mplace_id='".$data['$mplace_id']."' ");
$result = dbquery("DELETE FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='".$data['$mplace_id']."'");
}
i wstawić przed linią
//openside($locale['MPL400']);
poniższy kod
//usuwanie zakończonych anonsów
$result12 = dbquery("SELECT * FROM ".DB_MARKETPLACE." WHERE mplace_sold=0 ORDER BY mplace_datestamp DESC ");
if (dbrows($result12) != 0) {
while($data1 = dbarray($result12)) {
$poz=$data1['mplace_time']*86400;
$poz1=$data1['mplace_datestamp']+$poz;
$poz2=$poz1+86400;
$poz3=time();
if($poz2<$poz3) {
$result = dbquery("DELETE FROM ".DB_MARKETPLACE." WHERE mplace_id='".$data1['mplace_id']."' ");
$result = dbquery("DELETE FROM ".DB_MARKETPLACE_BIDDING." WHERE mplace_id='".$data1['mplace_id']."'");
}
}
}
naprawi to usuwanie anonsów po ustawionym czasie przez anonsodawcę.
Paczkę instalacyjną uaktualniłem.
Reqest dodał/a następującą plik:
Edytowane przez Reqest dnia 28.02.2013 00:05:05
|
|
|
|
Huragan Morag |
Dodany dnia 25.12.2014 10:18:56
|
Przedszkolak
Postów: 32 Ostrzeżeń: 2
v7.02.04 Data rejestracji: 03.01.2013 08:48
|
Wtyczka zainstalowała się poprawnie,ale wyskakuje błąd Table 'huraganmorag_cba_pl.fusions4KI4_marketplace' doesn't exist ,czy coś robię nie tak ?
PW od moderatora:
- Kody i kody błędów w code - bogdan 25.12.2014 10:40
Edytowane przez Huragan Morag dnia 26.12.2014 14:56:55
|
|
|
|
bogdan |
Dodany dnia 25.12.2014 10:40:12
|
Ekspert
Postów: 2451 Pomógł: 164
v7.02.07 Data rejestracji: 21.07.2009 12:55
|
Odinstaluj wtyczkę, edytuj plik infusion.php, znajdź wszystkie:
TYPE=MyISAM
zmień na:
ENGINE=MyISAM
Zainstaluj ponownie.
Nie szukaj Szczęścia, lecz dawaj Je innym, a wtedy samo do Ciebie przyjdzie.
Nie ma mnie na GG.
|
|
|
|
Huragan Morag |
Dodany dnia 25.12.2014 10:43:39
|
Przedszkolak
Postów: 32 Ostrzeżeń: 2
v7.02.04 Data rejestracji: 03.01.2013 08:48
|
Dzięki i pozdrawiam |
|
|