Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares > Mods & Themes
Reply
  #1  
Old 13th March 2011, 18:43
gabkoko's Avatar
gabkoko gabkoko is offline
Senior Member
 
Join Date: Aug 2010
P2P
Posts: 33
Wink Banner Management System
Hi,

this mod is lists the partner sites
I hope all things are here...

Add the sql:
PHP Code:
CREATE TABLE IF NOT EXISTS `partner` (
  `
idint(10unsigned NOT NULL auto_increment,
  `
titelvarchar(255character set latin1 collate latin1_german1_ci default NULL,
  `
bannervarchar(255character set latin1 collate latin1_german1_ci default NULL,
  `
linkvarchar(255character set latin1 collate latin1_german1_ci NOT NULL,
  
PRIMARY KEY  (`id`)
ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=
after create the partner.php
PHP Code:
<?
require_once('global.php');
gzip();
dbconn();
stdhead();
?>
<br><br><table cellpadding="0" cellspacing="0" border="0" style="width:100%" class="tableinborder">
<tr class="tabletitle" width="100%">
<td colspan="5" width="100%"><span  class="normalfont"><center><b>..::Partners::..</b></center></span></td>
</tr>
<?
$query 
"SELECT * FROM partner ORDER BY id DESC";
$sql mysql_query($query);
while (
$row mysql_fetch_array($sql)) {
$id $row['id'];
$titel $row['titel'];
$banner $row['banner'];
$url $row['link'];

echo (
"<tr><td width=100%  class=tablea><br><center><font  size=4>..::".$titel."::..</font></center>
<table width=100% border=0 cellspacing=0 cellpadding=5><tr><td class=text>
<center><a href="
.$url." target=_blank><IMG  SRC=".$banner." WIDTH=468 HEIGHT=60  border=0></a></center>
</td></tr></table><br/>"
);
}
echo (
"</table>");
stdfoot();
?>
create it addpartner.php
Important: in line 7
(if ($CURUSER["username"] != "admin") //admin username instead of your username)
PHP Code:
<?
require_once('global.php');
gzip();
dbconn();
stdhead();

if (
$CURUSER["username"] != "admin")  //admin username instead of your username

{
    print(
"<div class=error align=center><br>Sorry, but you  do not have permission :-)<br><br></div>");
    
stdfoot();
    exit;
}




///////////////////// New functions add \\\\\\\\\\\\\\\\\\\\\\\\\\\\

if($_GET['pa_name']) {
$pa_name $_GET['pa_name'];
$pa_banurl $_GET['pa_banurl'];
$pa_url $_GET['pa_url'];
$editid $_GET['editid'];
if (
$editid) {
$query "UPDATE partner SET
titel = '
$pa_name',
banner = '
$pa_banurl',
link = '
$pa_url' where id = $editid";
}
else
{
$query "INSERT INTO partner SET
titel = '
$pa_name',
banner = '
$pa_banurl',
link = '
$pa_url'";
}
$sql sql_query($query);
if(
$sql) {
$success TRUE;
} else {
$success FALSE;
}
}
if(
$success == TRUE) {
header("Location: " $_SERVER['PHP_SELF'] . "");

}

//Delete partner //////////////////////////////////////////////////////

$deleteid $_GET['deleteid'];
$query "DELETE FROM partner WHERE id=" .sqlesc($deleteid) . " LIMIT 1";
$sql sql_query($query);

///////////////////// New options add \\\\\\\\\\\\\\\\\\\\\\\\\\\\

print("<strong><font color='white'>New Partner:</font></strong>");
print(
"<br />");
print(
"<br />");

if (
$_GET['editid']) {

$editid $_GET['editid'];
$query "SELECT * FROM partner where id = '".$editid."'";
$sql sql_query($query);
$row sql_fetch_array($sql);
$id $row['id'];
$titel $row['titel'];
$banner $row['banner'];
$url $row['link'];
}
echo(
"<form name='form1' method='get' action='" $_SERVER['PHP_SELF'] . "'>");
echo(
"<table class=\"tablea\" cellspacing=\"0\" cellpadding=\"5\" width=\"100%\">");
echo(
"<tr><td><font color='black'>Site name:  </font></td><td align='left'><input type='text'  size='50' value='".$titel."'  name='pa_name'/></td></tr>");
echo(
"<tr><td><font color='black'>Banner-Url:  </font></td><td align='left'><input type='text'  size='50' value='$banner' name='pa_banurl'/></td></tr>");
echo(
"<tr><td><font color='black'>The site URL  address: </font></td><td align='left'><input  type='text' size='50' value='$url'  name='pa_url'/></td></tr>");
echo(
"<div align='center'><input type='hidden' name='editid' value='$id'/></div>");
echo(
"<tr><td></td><td><div  align='left'><input value='Create'  type='submit'/></div></td></tr>");
echo(
"</table>");
echo(
"</form>");

?>
<br><br><table cellpadding="0" cellspacing="0" border="0" style="width:100%" class="tableinborder">
<tr class="tabletitle" width="100%">
<td colspan="5" width="100%"><span  class="normalfont"><center><b><font  color="black">..::Partner's::..</font></b></center></span></td>
</tr>
<?
$query 
"SELECT * FROM partner ORDER BY id";
$sql mysql_query($query);
while (
$row mysql_fetch_array($sql)) {
$id $row['id'];
$titel $row['titel'];
$banner $row['banner'];
$url $row['link'];

echo (
"<tr><td width=100%  class=tablea><br><center><font color='black'  size=4>..::".$titel."::..</font></center>
<table width=100% border=0 cellspacing=0 cellpadding=5><tr><td class=text>
<center><a href="
.$url." target=_blank><IMG  SRC=".$banner." WIDTH=468 HEIGHT=60  border=0></a></center>
</td><td width=100% class=tableb><div  align='center'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a  href='"
$_SERVER['PHP_SELF'] . "?deleteid=$id'><img  src='pic/delete.jpg'></img></a></div></tr></table><br/>");
}
echo (
"</table>");
stdfoot();
?>
add /pic folder:
Click the image to open in full size.

open the following file for editing: ../scripts/dropdown.js

find it:
PHP Code:
var menu1=new Array();
menu1[0]='<a href="' baseurl '/admin/index.php">' l_staffpanel '</a>' 
add after:
PHP Code:
menu1[1]='<a href="' baseurl '/addpartner.php">" Banners "</a>' 
find it:
PHP Code:
var menu2=new Array();
menu2[0]='<a href="' baseurl '/admin/index.php">' l_staffpanel '</a>'
menu2[1]='<a href="' baseurl '/admin/index.php?act=statistics">' l_trackerstats '</a>' 
add after:
PHP Code:
menu2[2]='<a href="' baseurl '/addpartner.php">" Banners "</a>' 
find it:
PHP Code:
menu3[0]='<a href="' baseurl '/admin/index.php">' l_staffpanel '</a>'
menu3[1]='<a href="' baseurl '/admin/settings.php">' l_trackersettings '</a>'
menu3[2]='<a href="' baseurl '/admin/index.php?act=statistics">' l_trackerstats '</a>' 
add after:
PHP Code:
menu3[3]='<a href="' baseurl +  '/addpartner.php">Banners</a>' 
your template folder. open the header.php (../include/templates/your_template/header.php)

find it:
PHP Code:
<li class="page_item"><a href="#top" onclick="return  clickreturnvalue()" onmouseover="dropdownmenu(this, event,menu11,  '150px')" onmouseout="delayhidemenu()"><?php echo  $lang->global['extra']; ?></a></li>
add adter:
PHP Code:
<li class="page_item"><a href="<?php echo $BASEURL;  ?>/partner.php"><font color="white"><?php echo  "Partners"?></font></a></li>
and enjoy...

Screenshots:
Click the image to open in full size.
Click the image to open in full size.
Reply With Quote
The Following 10 Users Say Thank You to gabkoko For This Useful Post:
bodinho (24th November 2011), eckeO5 (20th March 2011), FENIX (9th May 2013), hart (14th March 2011), Marco (13th March 2011), Metalmania (13th April 2012), Nick (13th May 2011), PAX (21st February 2012), Titya (22nd March 2011), vulongvy (4th April 2012)
  #2  
Old 14th March 2011, 01:12
lafouine022 lafouine022 is offline
Senior Member
 
Join Date: Feb 2010
P2P
Posts: 120
Default
Nice.
Reply With Quote
  #3  
Old 14th March 2011, 04:05
hart's Avatar
hart hart is offline
Senior Member
 
Join Date: Sep 2010
P2P
Posts: 51
Default
Want to let me add this partner jumps - Security Protection Activated. If you followed a valid link, please notify us! -what's the problem?

Problem solved - thanks

Last edited by hart; 14th March 2011 at 04:56.
Reply With Quote
  #4  
Old 20th March 2011, 20:14
eckeO5 eckeO5 is offline
Senior Member
 
Join Date: Jan 2011
P2P
Posts: 117
Default
Thx for good work!!!!

Is it possible to get function addpartners work for a complete group of usergroups.
Maybe from partner vips up to admin?
Or admin and partner vips

May be some1 has a solution for this.

greetz ecke

Last edited by eckeO5; 23rd March 2011 at 00:47.
Reply With Quote
  #5  
Old 21st February 2012, 19:55
PAX's Avatar
PAX PAX is offline
Senior Member
 
Join Date: Nov 2010
P2P
Posts: 41
Default very good
thx
Reply With Quote
  #6  
Old 13th April 2012, 20:20
Metalmania Metalmania is offline
Member
 
Join Date: May 2011
P2P
Posts: 8
Default
thx
Reply With Quote
  #7  
Old 27th September 2012, 12:43
eckeO5 eckeO5 is offline
Senior Member
 
Join Date: Jan 2011
P2P
Posts: 117
Default ask again
Is it possible to get addpartner.php editable lets better say usable for more than one teammember?

have testet many ways by myself, but nor found a solution for that.

greetz to all

Bump: or maybe there is a way that the whole team can do partner entries.

eckeO5

Bump: done it now in line 7 with that code:

PHP Code:
if ($usergroups['cansettingspanel'] != 'yes'//admin username instead of your username 
Bump: seems to work.

may be others can test and reply their results
Reply With Quote
The Following 2 Users Say Thank You to eckeO5 For This Useful Post:
FENIX (9th May 2013), Protheush (2nd December 2014)
Reply

Tags
banner , management , system

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 16:30. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.