Pages: [1] 2   Go Down
  Print  
Author Topic: Can't change Premium fee... always $0  (Read 536 times)
DKosev
Newbie
*
Offline Offline

Posts: 16


View Profile
« on: January 22, 2012, 04:14:57 PM »

Hello,

I was searching for a while in the forum, but didn't find an answer that can solve my problem.
So basically the problem is this:

when a standard member request a payment, he has fixed Fee % that is 12% now ( I will ask for that something but later ) and the fee % is showing correctly, but when I'm putting whatever value in the settings for the Premium payout in the Withdraw page it only shows 0% and the minimum always shows 0, so I can't edit the minimum fee and the minimum amount for the Upgraded members.

Now I will ask something more, in the previous version of my script the fee calculating was something like that: when it is 1 % and a member request 2 cents the fee will be 1 cent, but my script is coded like that: if the fee again is 1 % and a member request 2 cents the fee will be 0.. this percent only apply if the withdraw amount is higher than 5c.. so can you guide me how can I do the fee's like the very first version?

Really I don't know what is the version of my script, the website is www.cash-clicks.info , if you need an information to solve the problem I will provide it!

Thank you!
Logged
Upgrade to an SDR 3
DKosev
Newbie
*
Offline Offline

Posts: 16


View Profile
« Reply #1 on: February 17, 2012, 11:04:56 AM »

Anyone? It's important!
Logged
ayman20068
Sr. Member
****
Offline Offline

Posts: 265


Offline Thursdays , Fridays


View Profile
« Reply #2 on: February 17, 2012, 11:10:56 AM »

open your cpanel ( server side ) and find this file : includes/settings.php
right click on it and click change permissions from 644 to 777
then go to your admin panel and change the fees to what you like , then in cpanel change that file permissions back to 644
Logged

DKosev
Newbie
*
Offline Offline

Posts: 16


View Profile
« Reply #3 on: February 17, 2012, 03:56:12 PM »

Hello,

Thank you for the post but the permissions of the settings file was 777..

I can provide the code from my withdraw_options and withdraw_option_edit pages:

admin2/withdraw_options.php

Code:
<?
$includes[title]="Withdraw Options";
//**S**//
if($action == "add") {
$sql=$Db1->query("INSERT INTO withdraw_options SET
title='".addslashes($title)."',
minimum='$minimum',
mps='$mps',
fee='$fee',
maxi='$maxi',
request='$request',
days='$days',
delim='$delim',
active='$active',
verif='$verif'
");
$Db1->sql_close();
header("Location: admin.php?view=admin&ac=withdraw_options&".$url_variables."");
}


$sql=$Db1->query("SELECT * FROM withdraw_options ORDER BY title");
while($temp=$Db1->fetch_array($sql)) {
$tablelist.="
<tr>
<td>$temp[title]</td>
<td>$temp[minimum]</td>
<td>$temp[maxi]</td>
<td>$temp[request]</td>
<td>".floor(($temp[days])/24/60/60)." Days</td>
<td><b>$temp[delim]</b></td>
<td>$temp[mps]</td>
<td><input type=\"button\" value=\"Edit\" onclick=\"location.href='admin.php?view=admin&ac=withdraw_option_edit&id=$temp[id]&".$url_variables."'\"></td>
<td><input type=\"button\" value=\"Delete\" onclick=\"if(confirm('Are you sure you want to delete this withdraw option?')) location.href='admin.php?view=admin&ac=withdraw_options&action=delete&id=$temp[id]&".$url_variables."'\"></td>
</tr>
";
}

if($action == "delete") {
$sql=$Db1->query("SELECT * FROM requests WHERE accounttype='$id'");
if($Db1->num_rows() == 0) {
$sql=$Db1->query("DELETE FROM withdraw_options WHERE id='$id'");
$Db1->sql_close();
header("Location: admin.php?view=admin&ac=withdraw_options&".$url_variables."");
}
else {
$includes[content]="There are pending withdraw requests for this withdraw method<br>You cant delete this untill these pending withdraws are paid.";
}
}
else {
$includes[content]="
<table width=\"100%\" class=\"tableStyle2\">
<tr>
<td class=\"tableHeadmain\"><b>Title</b></td>
<td class=\"tableHeadmain\"><b>Cashout</b></td>
<td class=\"tableHeadmain\"><b>Max Cashout</b></td>
<td class=\"tableHeadmain\"><b>Request Can be Made</b></td>
<td class=\"tableHeadmain\"><b>days</b></td>
<td class=\"tableHeadmain\"><b>Deliminator</b></td>
<td class=\"tableHeadmain\"><b>Mass Pay Structure</b></td>
<td class=\"tableHeadmain\"><b>Modify</b></td>
<td class=\"tableHeadmain\"><b>Remove</b></td>
</tr>
$tablelist
</table>

<br><hr>

<b>New Withdraw Option</b><br>
<div align=\"center\">
<table class=\"tableStyle2\">
<tr>
<td width=100 class=\"tableHeadmain\"><b>Field</td>
<td class=\"tableHeadmain\"><b>Description</td>
</tr>
<tr>
<td>Amount</td>
<td>The amount being withdrawn.</td>
</tr>
<tr>
<td>Account</td>
<td>The account the money is to be sent to.</td>
</tr>
<tr>
<td>Username</td>
<td>The member's username.</td>
</tr>
<tr>
<td>{tab}</td>
<td>Inserts a tab space for delimination.</td>
</tr>
</table>
</div>
<form action=\"admin.php?view=admin&ac=withdraw_options&action=add&".$url_variables."\" method=\"post\">

<Table cellpadding=0 cellspacing=0>
<tr>
<td width=100>Payment Processor: </td>
<td><input type=\"text\" name=\"title\" value=\"".htmlentities($option[title])."\"></td>
</tr>
<tr>
<td>Minimum Cashout: </td>
<td><input type=\"text\" name=\"minimum\" value=\"\" size=4></td>
</tr>
<tr>
<td>Maximum Cashout: </td>
<td><input type=\"text\" name=\"maxi\" value=\"\" size=4> <small>(leave blank for none)</small></td>
</tr>
<tr>
<td>Payment Request: </td>
<td><input type=\"text\" name=\"request\" value=\"\" size=4> <small>(how many times a person can request payment)</small></td>
</tr>
<tr>
<td>Turn Frequency on?: </td>
<td><select name=\"daysa\">
<option value=\"1\">Yes</option>
<option value=\"0\">No</option>
</select></td>
</tr>
<tr>
<td>Frequency: </td>
<td><select name=\"days\">
<option value=\"2592000\">30 days</option>
<option value=\"1728000\">20 days</option>
<option value=\"1296000\">15 days</option>
<option value=\"86400\">10 days</option>
<option value=\"604800\">7 days</option>
<option value=\"432000\">5 days</option>
<option value=\"259200\">3 days</option>
<option value=\"172800\">2 days</option>
<option value=\"86400\">1 day</option>
</select> <small>(how often a person can request payment)</small></td>
</tr>
<tr>
<td>Fee(will be %): </td>
<td><input type=\"text\" name=\"fee\" value=\"0\" size=1>%</td>
</tr>
<tr>
<td>Mass Pay Structure: </td>
<td><input type=\"text\" name=\"mps\" value=\"username{tab}account{tab}amount{tab}USD\" size=40></td>
</tr>
<tr>
<td>Spacer: </td>
<td><input type=\"text\" name=\"delim\" value=\"{tab}\" size=3></td>
</tr>
<tr>
<td>Active: </td>
<td>
<select name=\"active\">
<option value=\"1\">Yes
<option value=\"0\">No
</select>
</td>
</tr>
<tr>
<td>Verification Type: </td>
<td>
<select name=\"verif\">
<option value=\"email\">Email
<option value=\"int\">Integer
</select>
</td>
</tr>
<tr>
<td colspan=2 align=\"center\"><input type=\"submit\" value=\"Add Withdraw Option\"></td>
</tr>
</table>

</form>

In the field above, simply enter the mass pay structure needed for the withdraw method including the required deliminator. Do not use any \" or ' quotation marks<br>
Below are a few examples<br><hr width=150 align=\"left\">
account<b>{tab}</b>amount<br>
account<b>{tab}</b>amount<b>{tab}</b>username<br>
Paypal: account<b>{tab}</b>amount<b>{tab}</b>USD<br>
e-Gold: account<b>|</b>amount<br>

";
}
//**E**//
?>




admin2/withdraw_option_edit.php

Code:
<?
$includes[title]="Edit Withdraw Option";

if($action == "save") {
$Db1->query("UPDATE withdraw_options SET
title='".addslashes($title)."',
minimum='$minimum',
maxi='$maxi',
mps='$mps',
fee='$fee',
request='$request',
days='$days',
daysa='$daysa',
delim='$delim',
active='$active',
verif='$verif'
WHERE id='$id'");
}

$sql=$Db1->query("SELECT * FROM withdraw_options WHERE id='$id'");
if($Db1->num_rows() != 0) {
$option=$Db1->fetch_array($sql);

$includes[content]="
<div align=\"right\"><a href=\"admin.php?view=admin&ac=withdraw_options&".$url_variables."\">Back To Withdraw Options</a></div>
".iif($action=="save","<b style=\"color: darkred\">Your Changed Have Been Saved!</b>")."
<div align=\"center\">
<form action=\"admin.php?view=admin&ac=withdraw_option_edit&action=save&id=$id&".$url_variables."\" method=\"post\">
<Table cellpadding=0 cellspacing=0>
<tr>
<td>Payment Processor: </td>
<td><input type=\"text\" name=\"title\" value=\"".htmlentities($option[title])."\"></td>
</tr>
<tr>
<td>Minimum Cashout: </td>
<td><input type=\"text\" name=\"minimum\" value=\"$option[minimum]\" size=4></td>
</tr>
<tr>
<td>maximum Cashout: </td>
<td><input type=\"text\" name=\"maxi\" value=\"$option[maxi]\" size=4> <small>(leave blank for none)</small></td>
</tr>
<tr>
<td>Payment Request: </td>
<td><input type=\"text\" name=\"request\" value=\"$option[request]\" size=4> <small>(how many times a person can request payment, 0 for unlimeted)</small></td>
</tr>
<tr>
<td>Turn Frequency on?: </td>
<td><select name=\"daysa\">
<option value=\"1\">Yes</option>
<option value=\"0\">No</option>
</select></td>
</tr>
<tr>
<td>Frequency: </td>
<td><select name=\"days\">
<option value=\"2592000\">30 days</option>
<option value=\"1728000\">20 days</option>
<option value=\"1296000\">15 days</option>
<option value=\"86400\">10 days</option>
<option value=\"604800\">7 days</option>
<option value=\"432000\">5 days</option>
<option value=\"259200\">3 days</option>
<option value=\"172800\">2 days</option>
<option value=\"86400\">1 day</option>
<option value=\"\">Anytime</option>
</select> <small>(how often a person can request payment)</small></td>
</tr>
<tr>
<td>Fee: </td>
<td><input type=\"text\" name=\"fee\" value=\"$option[fee]\" size=2>%</td>
</tr>
<tr>
<td>Mass Pay Structure: </td>
<td><input type=\"text\" name=\"mps\" value=\"$option[mps]\" size=40></td>
</tr>
<tr>
<td>Spacer: </td>
<td><input type=\"text\" name=\"delim\" value=\"$option[delim]\" size=1 style=\"text-align: center\"></td>
</tr>
<tr>
<td>Active: </td>
<td>
<select name=\"active\">
<option value=\"1\"".iif($option[active] == 1,"selected=\"selected\"").">Yes
<option value=\"0\"".iif($option[active] == 0,"selected=\"selected\"").">No
</select>
</td>
</tr>
<tr>
<td>Verification Type: </td>
<td>
<select name=\"verif\">
<option value=\"\">
<option value=\"email\"".iif($option[verif] == "email","selected=\"selected\"").">Email
<option value=\"int\"".iif($option[verif] == "int","selected=\"selected\"").">Integer
</select>
</td>
</tr>
<tr>
<td colspan=2 align=\"center\"><input type=\"submit\" value=\"Save\"></td>
</tr>
</table>
</form>
</div><br>

";
}
else {
$includes[content]="There was an error loading the withdraw option!";
}
?>


I think the problem is from these pages.. please check the code and if you know something that I can try post here..

Thank you!
« Last Edit: February 17, 2012, 03:58:39 PM by DKosev » Logged
ayman20068
Sr. Member
****
Offline Offline

Posts: 265


Offline Thursdays , Fridays


View Profile
« Reply #4 on: February 18, 2012, 11:42:07 AM »

seems you have addon to place limit between cashout requests
as a temp solution go to your cpanel , open phpmyadmin find your site database , then withdraw options
and change the fees column inside it
1 = 1% ( so put any number you like )


fee = fee for standard members
fee_premium = fee for premium members

i'll check your posted codes later and try to find if there are any errors in it
Logged

DKosev
Newbie
*
Offline Offline

Posts: 16


View Profile
« Reply #5 on: February 19, 2012, 12:51:11 PM »

Thank you for the partial solution, but I will take it as a Plan B..

I'm looking forward for your reply and hope the mistake will be somewhere in the code provided..

Logged
ayman20068
Sr. Member
****
Offline Offline

Posts: 265


Offline Thursdays , Fridays


View Profile
« Reply #6 on: February 20, 2012, 04:33:55 PM »

i wanted you to check the database , so i know if this column already exists or were removed with the withdraw methods modification you have

but the solution is simple ( based on the existence of the premium fee column )

* in the file called withdraw_option.php :

after the line 9 :
Code:
fee='$fee',
add this code :
Code:
fee_premium=' $fee_premium',

at line 135 :
Code:
<tr>
<td>Fee(will be %): </td>
<td><input type=\"text\" name=\"fee\" value=\"0\" size=1>%</td>
</tr>

add this code :
Code:
<tr>
<td>Fee For Premium Members: </b></td>
<td ><input type=\"text\" name=\"fee_premium\" value=\"0\" size=1>%</td>
</tr>

this would fix the problem of adding fees for premium members when creating any new payment processors


now to fix current processors
in this file : withdraw_option_edit.php

after line 10 :
Code:
fee='$fee',

add this code :
Code:
fee_premium=' $fee_premium',

then after line 68 :
Code:
<tr>
<td>Fee: </td>
<td><input type=\"text\" name=\"fee\" value=\"$option[fee]\" size=2>%</td>
</tr>

add this code :
Code:
<tr>
<td>Fee: </td>
<td><input type=\"text\" name=\"fee_premium\" value=\"$option[fee_premium]\" size=2>%</td>
</tr>

this should fix your problem

if any errors just post it here
Logged

DKosev
Newbie
*
Offline Offline

Posts: 16


View Profile
« Reply #7 on: February 21, 2012, 03:12:13 PM »

Hehe the code is working great!

Thank you ayman20068, I didn't believe that it can be fixed with so few code Smiley Thank you again! !!

I think it is small code, but in the withdraw page the Upgraded members only see 0,00 as a minimum amount.. how can I modify it? Maybe we can add some code like the fee field in the withdraw_options_edit?

« Last Edit: February 21, 2012, 03:14:57 PM by DKosev » Logged
DKosev
Newbie
*
Offline Offline

Posts: 16


View Profile
« Reply #8 on: February 24, 2012, 04:46:33 AM »

In the meantime when I'm waiting the ayman20068's reply, is it possible to make the Total Paid value in Site Stats to be in this format: xxx,xx - every x to be changeable.

I mean when the Total Paid for example is 100,00 and I paid 0.17 for someone the Total value will be again 100,00 - nothing change.

Can it be so correct and count to two signs after the comma?
Logged
ayman20068
Sr. Member
****
Offline Offline

Posts: 265


Offline Thursdays , Fridays


View Profile
« Reply #9 on: February 24, 2012, 12:12:11 PM »

Hehe the code is working great!

Thank you ayman20068, I didn't believe that it can be fixed with so few code Smiley Thank you again! !!

I think it is small code, but in the withdraw page the Upgraded members only see 0,00 as a minimum amount.. how can I modify it? Maybe we can add some code like the fee field in the withdraw_options_edit?



can you explain a bit more what you need , or better post a screen shot as i don't fully understand your point


In the meantime when I'm waiting the ayman20068's reply, is it possible to make the Total Paid value in Site Stats to be in this format: xxx,xx - every x to be changeable.

I mean when the Total Paid for example is 100,00 and I paid 0.17 for someone the Total value will be again 100,00 - nothing change.

Can it be so correct and count to two signs after the comma?

open your cpanel , then go to templates and your current template , find this file :
layout_header.php

inside it find this line :
Code:
<td align=\"center\">$".number_format(round($totalpaid[total],2))."</td><td align=\"center\">Total Paid </td></tr>

change it to this :
Code:
<td align=\"center\">$".number_format($totalpaid[total],2)."</td><td align=\"center\">Total Paid </td></tr>

that should make it show fine as you want now
Logged

DKosev
Newbie
*
Offline Offline

Posts: 16


View Profile
« Reply #10 on: February 25, 2012, 08:23:38 AM »

The code for the Total Paid value work great! Thank you!

About the minimum Payout..:



I've made a screenshot from the withdraw page while I'm upgraded..

Standard members can see the minimum value, but the Upgraded members see only zero..

Do you have any ideas?

--------------------------------------------------------

I've fixed it Smiley
Used your method for the fees, it was the same.. so it works great now for me!
« Last Edit: February 28, 2012, 12:47:22 PM by DKosev » Logged
ayman20068
Sr. Member
****
Offline Offline

Posts: 265


Offline Thursdays , Fridays


View Profile
« Reply #11 on: February 28, 2012, 02:11:45 PM »

I've fixed it Smiley
Used your method for the fees, it was the same.. so it works great now for me!


 Grin good to hear that , i just saw this reply didn't know you posted the ss already  Cheesy
Logged

DKosev
Newbie
*
Offline Offline

Posts: 16


View Profile
« Reply #12 on: February 28, 2012, 03:13:53 PM »

Thank you for your support so far Smiley Of course I have some more issues which you probably know how to fix it...

So here you are the first one:



Here you can see the forum of my aurora site, the red arrow shows where is the last thread for today..
If someone post another thread today (28.02) it will go under the pointed one.

In the database the format of last reply was 0000-00-00 00:00:00 but it is too long and I've shortened it.. how can I modify it to be properly tight?

In one word - the last thread to be shown at the top..

I can provide you the code from members/viewforum.php

Thank you in advance! Smiley


Code:
<head>

<script language="javascript" type="text/javascript">



function insertIM(id){

var obj = document.getElementById('descrip');if(typeof(document.selection)!='undefined')



{



obj.focus();

var range = document.selection.createRange();



if(range.parentElement() != obj) {

return false;



}

var orig = obj.value.replace(/rn/g, "n");



range.text = id;

var actual = tmp = obj.value.replace(/rn/g, "n");



for(var diff = 0; diff < orig.length; diff++) {

if(orig.charAt(diff) != actual.charAt(diff)) break;



}

for(var index = 0, start = 0; (tmp = tmp.replace(id, "")) && (index <= diff); index = start + id.length) {



start = actual.indexOf(id, index);



}

} else {



var startPos = obj.selectionStart;

var endPos = obj.selectionEnd;



obj.value = obj.value.substr(0, startPos) + id + obj.value.substr(endPos, obj.value.length);





}

}

</script>

</head>

<?

$includes[title]="Cash-Clicks Forum";  



/******************************************************************************\

 * Copyright (C) 2010 Developz                                          *

 *                                                                            *

 * This addon was made by Developz.   *

 *                                                                            *

 *                                  FreeAuroraAddons.info *

\******************************************************************************/

  include"forumbbcodes.php";



if($_GET['forum'] != "") $forum=$_GET['forum'];

else if($_POST['forum'] != "") $forum=$_POST['forum'];    

$viewforum=$_GET['viewforum'];







if(strip_tags($_POST['insert']) && strip_tags($_POST['subject']) && strip_tags($_POST['descrip'])){



$subject=strip_tags($_POST['subject']);

$descrip=strip_tags($_POST['descrip']);



$today = gmdate('Y-m-d h:i:s');



mysql_query("INSERT INTO `forum_topics` (`id`, `username`, `subject`, `descrip`, `lastpost`, `forum`, `stickyorn`)

VALUES ('', '$username', '$subject', '$descrip', '$today', '$viewforum', '0');") or die (

mysql_error());

echo "Topic Successfully Created!";

}



if($action == "delete") {

$sql=$Db1->query("DELETE FROM forum_topics WHERE id='$id'");

header("Location: index.php?view=account&ac=viewforum&viewforum=$viewforum&".$url_variables."");

}





$tbl_name=""; //your table name

// How many adjacent pages should be shown on each side?

$adjacents = 3;



/*

  First get total number of rows in data table.

  If you have a WHERE clause in your query, make sure you mirror it here.

*/



$query = "SELECT COUNT(*) as num FROM forum_topics WHERE forum='$viewforum'";

$total_pages = mysql_fetch_array(mysql_query($query));

$total_pages = $total_pages[num];



/* Setup vars for query. */

$targetpage = "index.php?view=account&ac=viewforum&viewforum=$viewforum&".$url_variables.""; //your file name  (the name of this file)

$limit = 50; //how many items to show per page

$page = $_GET['page'];

if($page)

$start = ($page - 1) * $limit; //first item to display on this page

else

$start = 0; //if no page var is given, set start to 0



/* Get data. */

          $sql=$Db1->query("SELECT * FROM forum_topics WHERE forum='$viewforum' ORDER BY lastpost DESC LIMIT $start, $limit");

$result = mysql_query($sql);



/* Setup page vars for display. */

if ($page == 0) $page = 1; //if no page var is given, default to 1.

$prev = $page - 1; //previous page is page - 1

$next = $page + 1; //next page is page + 1

$lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up.

$lpm1 = $lastpage - 1; //last page minus 1



/*

Now we apply our rules and draw the pagination object.

We're actually saving the code to a variable in case we want to draw it more than once.

*/

$pagination.= "";

if($lastpage > 1)

{

$pagination.= "";

//previous button

if ($page > 1)

$pagination.= "<a href=\"$targetpage&page=$prev\"> &laquo; Previous </a>";

else

$pagination.= "&laquo; Previous&nbsp;";



//pages

if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up

{

for ($counter = 1; $counter <= $lastpage; $counter++)

{

if ($counter == $page)

$pagination.= "$counter/";

else

$pagination.= "<a href=\"$targetpage&page=$counter\">$counter/</a>";

}

}

elseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some

{

//close to beginning; only hide later pages

if($page < 1 + ($adjacents * 2))

{

for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)

{

if ($counter == $page)

$pagination.= "$counter";

else

$pagination.= "<a href=\"$targetpage&page=$counter\">$counter</a>";

}

$pagination.= "...";

$pagination.= "<a href=\"$targetpage&page=$lpm1\">$lpm1</a>";

$pagination.= "<a href=\"$targetpage&page=$lastpage\">$lastpage</a>";

}

//in middle; hide some front and some back

elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))

{

$pagination.= "<a href=\"$targetpage&page=1\">1</a>";

$pagination.= "<a href=\"$targetpage&page=2\">2</a>";

$pagination.= "...";

for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)

{

if ($counter == $page)

$pagination.= "$counter";

else

$pagination.= "<a href=\"$targetpage&page=$counter\">$counter</a>";

}

$pagination.= "...";

$pagination.= "<a href=\"$targetpage&page=$lpm1\">$lpm1</a>";

$pagination.= "<a href=\"$targetpage&page=$lastpage\">$lastpage</a>";

}

//close to end; only hide early pages

else

{

$pagination.= "<a href=\"$targetpage&page=1\">1</a>";

$pagination.= "<a href=\"$targetpage&page=2\">2</a>";

$pagination.= "...";

for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)

{

if ($counter == $page)

$pagination.= "$counter";

else

$pagination.= "<a href=\"$targetpage&page=$counter\">$counter</a>";

}

}

}



//next button

if ($page < $counter - 1)

$pagination.= "<a href=\"$targetpage&page=$next\">&nbsp;Next &raquo;</a>";

else

$pagination.= "&nbsp; Next &raquo; ";

$pagination.= "\n";

}







if($Db1->num_rows() != 0) {

while($he=$Db1->fetch_array($sql)) {

$totalpos= mysql_num_rows(mysql_query("SELECT id FROM forum_replys WHERE idto='$he[id]'"));

$linkads.="







 <tr>

<td>

<img src=\"members/images/topicico.gif\">

<b><a href=\"index.php?view=account&ac=viewtopic&viewtopicid=$he[id]&".$url_variables."\">$he[subject]</a></b></td>

<td><a href=\"index.php?view=account&ac=viewprofile&viewuser=$he[username]&".$url_variables."\"><center>$he[username]</center></a></td>

<td><center>$totalpos</center></td>

<td><center>$he[lastpost] ".iif($permission==7," <a href=index.php?view=account&ac=viewforum&viewforum&action=delete&id=$he[id]> [X] </a>")."</center></td>

</tr>

      



";

}}

$includes[content]="

<a href=\"index.php?view=account&ac=forumindex&".$url_variables."\">Cash-Clicks Forum >>> </a>

<a href=\"index.php?view=account&ac=viewforum&viewforum=$viewforum&".$url_variables."\"><b>$viewforum</b></a>

 <table width=\"100%\" class=\"tableData\" border=\"1\">

   <tr bgcolor=\"#036\">

     <th width=\"60%\"><font color=\"white\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Topic:</font></th>

     <th width=\"10%\"><font color=\"white\"><center>Author:</center></font></th>

     <th width=\"10%\"><font color=\"white\"><center>Replies:</center></font></th>
 
 <th width=\"20%\"><font color=\"white\"><center>Last Post:</center></font></th>

       </tr>

$linkads

</table><br />



$pagination



<br /><br /> <form id=\"form1\" method=\"post\" action=\"\">

   <div align=\"center\">

     <table width=\"515\" border=\"1\" cellpadding=\"7\" cellspacing=\"0\" class=\"tableData\">

       <tr>

         <th bgcolor=\"#036\"><font color=\"white\">Create A New Topic:</font></th>

            </tr>

       <tr bgcolor=\"#F5F5F5\">

         <td>Subject:

              <br /><input name=\"subject\" type=\"text\" id=\"subject\" value=\"\"  maxlength=\"43\" style=\"width:100%;\"/></td>

            </tr>

       <tr bgcolor=\"#F5F5F5\">

         <td>Content:

           <textarea name=\"descrip\" id=\"descrip\" rows=\"5\" style=\"width:100%;\"></textarea>

           

           <input type=\"submit\" name=\"insert\" id=\"insert\" value=\"Create Topic!\" style=\"width:100%;\"/>

              </td>

            </tr>

<tr bgcolor=\"#F5F5F5\"><td><div align=\"center\">

      <img src=members/smiles/picture.png  onClick=\"insertIM('[img] URL [/img]')\" />

      <img src=members/smiles/boldt.png onClick=\"insertIM('[b] Text [/b]')\" />

      <img src=members/smiles/ita.png  onClick=\"insertIM('[i] Text [/i]')\" />

      <img src=members/smiles/under.png  onClick=\"insertIM('[u] Text [/u]')\" />

      <img src=members/smiles/quote.gif  onClick=\"insertIM('[quote] Text [/quote]')\" />

      <img src=\"members/smiles/sourire.gif\" onClick=\"insertIM(':)')\" />

      <img src=\"members/smiles/pleure.gif\"  onClick=\"insertIM(':(')\" />

      <img src=\"members/smiles/clin-oeuil-langue.gif\"  onClick=\"insertIM(':p')\" />

      <img src=\"members/smiles/cool.gif\"  onClick=\"insertIM(':8')\" />

      <img src=\"members/smiles/content.gif\"  onClick=\"insertIM(':o')\" />

      <img src=\"members/smiles/evil.gif\"  onClick=\"insertIM('[evil]')\" />

      <img src=\"members/smiles/confused.gif\"  onClick=\"insertIM(':s')\" />

      <img src=\"members/smiles/biere.gif\"  onClick=\"insertIM('[beer]')\" />

      <img src=\"members/smiles/clin-oeuil.gif\"  onClick=\"insertIM(';)')\" />

      <img src=\"members/smiles/rolleyes.gif\"  onClick=\"insertIM('8-)')\" />

</div><br />* Maximum 1000 characters!</td></tr>

          </table>

        </div>

</form>
";

?>


Another problem that I can't fix is this:



You can see a screen from gpt.php while I'm clicking an ad, but in the top frame there is a blank row which I can't find where it is to remove..

The green place is the row.. so do you know where I can check to remove it?
I saw that other auroras are the same like mine.. they have this blank row like mine..

« Last Edit: February 28, 2012, 03:22:20 PM by DKosev » Logged
ayman20068
Sr. Member
****
Offline Offline

Posts: 265


Offline Thursdays , Fridays


View Profile
« Reply #13 on: February 28, 2012, 04:01:57 PM »

the forum basic script is set like that it was made by developz , the script just brings the last post from database and arrange it by lastpost date

Code:

/* Get data. */

          $sql=$Db1->query("SELECT * FROM forum_topics WHERE forum='$viewforum' ORDER BY lastpost DESC LIMIT $start, $limit");

$result = mysql_query($sql);

so any change will mean to change the entire way the scripts gets info from database and also how it stores it , so will mean making a new forum , or sort of an upgrade to it , which isn't possible to do in few replies ,
the integrated forum was basically released as free script  Grin so it's good you don't get much problems with it , keep it this way as long as it's working

- for the timer the changes are to be done here :
source/clicking and the files are timer.php ( to change the content showing )
and timer.css to change heights , sizes style of fonts and such things
Logged

DKosev
Newbie
*
Offline Offline

Posts: 16


View Profile
« Reply #14 on: February 29, 2012, 06:01:18 AM »

I've found a way that it can be fixed (the forum) when I order the threads with "id" but if someone post on an old thread it wouldn't be moved at the top Smiley So it isn't good..

Tried some ideas to order the data by two variables but it isn't so easy, isn't it? Smiley

Do you know is it possible to order it first by id and then by lastpost?

Something like that:

$sql=$Db1->query("SELECT * FROM forum_topics WHERE forum='$viewforum' ORDER BY id, lastpost DESC LIMIT $start, $limit");

The other idea is, is it possible to make two equal sql commands, something like that:

$sql=$Db1->query("SELECT * FROM forum_topics WHERE forum='$viewforum' ORDER BY id DESC LIMIT $start, $limit");
$sql=$Db1->query("SELECT * FROM forum_topics WHERE forum='$viewforum' ORDER BY lastpost DESC LIMIT $start, $limit");

I was playing with the sql commands but it wouldn't work properly.. what do you thing about that?

Now for the timer.. at least I was at the right place before you answer the question Smiley I was on that .php and .css page many times but can't figure it out what to change to delete that blank row.

The code from the timer.php is:

Code:
<?



if(!IN_CLICKING) exit;



$referringurl=parse_url($HTTP_REFERER);

$selfurl=parse_url($_SERVER['PHP_SELF']);

if (!($referringurl['path'] == $selfurl['path'] && $referringurl['host'] == $_SERVER['HTTP_HOST'])) {

logError("Failed referring host check while clicking: {$HTTP_REFERER}");

error("There was an error validating your session");

}





if($id != -1) {

if(true) { //TODO setup admin setting for showing banner

$banner=$Db1->query_first("SELECT * FROM banners WHERE credits>=1  order by rand() limit 1");

if(isset($banner[id])) $Db1->query("UPDATE banners SET credits=credits-1, views=views+1 WHERE id='{$banner[id]}'");

}





$key=$Db1->querySingle("SELECT val FROM click_sessions WHERE dsub='{$pretime}' and username='{$username}' and type='{$type}' ","val");



srand ((float) microtime() * 10000000);

$buttons = array ("1", "2", "3", "4", "5", "6", "7", "8", "9");

$rand_keys = array_rand ($buttons, 4);

$key = $buttons[$rand_keys[$key]];

for($x=0; $x<4; $x++) { $buttonlist.="<li><a href=\"#\" onclick=\"next({$x})\" id=\"button{$x}\"><img src=\"clickimages/".$buttons[$rand_keys[$x]].".gif\" alt=\"Button\" /></a></li>\n"; }



$t = $Db1->query_first("SELECT ".(($type=="ce" || $type=="ptre")?"":"timed,")." target FROM ".$adTables[$type]." WHERE id='{$id}'");



if($type=="ce") $timer=$settings['ce_time'];

elseif($type=="ptre") $timer=$settings['ptr_time'];

else $timer=$t['timed'];



$target=$t['target'];

}



?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />

<title><?=$settings['site_title'];?></title>

<link href="templates/<?=$settings['template'];?>/timer.css?" rel="stylesheet" type="text/css" />

<script type="text/javascript">

var id="<?=$id;?>";

var url_variables="<?=$url_variables;?>";

var timer=<? echo ($timer+1); ?>;

var type="<?=$type;?>";

var key="<?=$key;?>";

var pretime="<?=$pretime;?>";



</script>

<script type="text/javascript" src="./includes/ajax/jquery.js"></script>

<script type="text/javascript" src="./source/clicking/timer.js"></script>

</head>

<body>



<div id="banner"><a href="bannerclick.php?id=<?=$banner[id];?>" target="_blank"><img src="<?=$banner[banner];?>" alt="Banner Advertisement" /></a></div>


<div id="timer">Loading..</div>



<div id="buttons"><ul><?=$buttonlist;?></ul></div>





<div id="menu">



<li><a href="<?=$target;?>" target="_blank">Visit Fullscreen.</a></li>

<li><a href="#" onClick="reportAd()">Report!</a></li>
    
    <li>Earned Today: $<?=$thismemberinfo['earned_today'];?></li>

<? if(!$LOGGED_IN && !$type == "ptre") { ?>

<li><a href="index.php?view=join&<? echo $url_variables; ?>"><span><span>Register</span></span></a></li>

<li><a href="index.php?view=login&<? echo $url_variables; ?>"><span><span>Login</span></span></a></li>





<? } ?>

</div>



<div id="logo"></div>



</body>

</html>


The code from timer.css is:

Code:
body {
padding: 0px;
margin: 0px;
font-size: 14px;
color: black;
    background-color: url(/images/timer.gif);
    background-repeat: repeat-x;
}
a {
color: black;
text-decoration: none;
    margin: 0 3px;
}
ul {
margin: 0px;
padding: 0px;
}
li {
list-style: none;
display: block;
float: left;
margin: 0px;
padding: 0px;
}
img {
border: none;
}
#buttons {
display: none;
float: left;
padding-left: 25px;
}
#buttons li {
padding: 7px 0px 0px;
}
#menu {
position: absolute;
top: 37px;
left: 15px;
text-align: center;
}
#menu li {
padding: 2px 15px 0px 0px;
text-align: center;
}
#timer {
float: left;
padding: 5px 0px 0px 15px;
font-size: 30px;
text-align: left;
width: 115px;
}

#banner {
width: 468px;
height: 60px;
position: absolute;
top: 5px;
right: 5px;
bottom: 5px;
overflow: hidden;
}
#banner img {
width: 468px;
height: 60px;
}

Thank you again, as usual Smiley
Logged
Get a SDR 3 NOW at http://ptcfactory.info

The best and most up to date Aurora script in the market!!
Pages: [1] 2   Go Up
  Print  
 
Jump to: