darubillah Posted June 16, 2009 Share Posted June 16, 2009 hi, i want to convert GeN3 PTC Script into a GeN3 PTA script herez the script http://www.ziddu.com/download/4122590/Gen3v1.2.1.zip.html i just want to add some code in themes/gen3/ads.php so that it will only show advertisement if that user had buyed any advertisement package in SHORT I WANT IT TO WORK LIKE http://PAYEE.ME PLEASE DONT ADD CODE POST IT IN THIS TOPIC SO THAT I CAN LEARN HOW TO DO IT THANKS Shayan Quote Link to comment https://forums.phpfreaks.com/topic/162385-ptc-to-pta-conversion/ Share on other sites More sharing options...
ober Posted June 16, 2009 Share Posted June 16, 2009 Do you understand the script? It's hard for us to help you if you didn't write it. edit: And please do not double-post in the future. Quote Link to comment https://forums.phpfreaks.com/topic/162385-ptc-to-pta-conversion/#findComment-857110 Share on other sites More sharing options...
darubillah Posted June 18, 2009 Author Share Posted June 18, 2009 hello, sorry for late reply and also for double posting ya i understand this script well! see here this is the table for ads package -- phpMyAdmin SQL Dump -- version 2.11.7 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 18, 2009 at 08:05 PM -- Server version: 5.0.51 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `angaray_gen3` -- -- -------------------------------------------------------- -- -- Table structure for table `ad_packages` -- CREATE TABLE IF NOT EXISTS `ad_packages` ( `id` int(11) NOT NULL auto_increment, `clicks` int(11) NOT NULL, `price` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; -- -- Dumping data for table `ad_packages` -- INSERT INTO `ad_packages` (`id`, `clicks`, `price`) VALUES (1, 100, '1.25'), (2, 200, '2.50'), (3, 300, '3.75'), (4, 400, '5.00'), (5, 500, '6.25'), (6, 1000, '12.5'); Now i want to add an expiration table in it, for example when anyone buys a 100 click package then it will expires in 10 days and similarly when anyone buys 200 click package then it will expires in 20 days IT WILL BE MORE EASY TO EXPLAIN ME, AND TO GET UNDERSTOOD BY YOU, IF INSTALL THIS SCRIPT YOU CAN FIND DEMO IN HTTP://PTCPLACES.COM ADMIN DEMO HTTP://PTCPLACES.COM/ADMIN login : admin Password : Dopy134 thanks Shayan Quote Link to comment https://forums.phpfreaks.com/topic/162385-ptc-to-pta-conversion/#findComment-858917 Share on other sites More sharing options...
darubillah Posted June 18, 2009 Author Share Posted June 18, 2009 hi, THIS WOULD BE THE NEXT STEP see this is themes/gen3/ads.php <?php if(!defined('GEN2_PROCESS')) { exit(); } $ref_title = "Surf Advertisements"; if(!$ads_show) { $ads_show = "<tr><td colspan=4 class='bar'>There are currently no advertisements.</p></td></tr>"; } $mbs = date("h:i A",$set['next_clearup']); $cst = date("h:i A"); if(!$ads_av) { $ads_av = '0'; } $contents = <<<CONT <table><tr><td><img src='themes/GeN3/images/chart.png' align='center'></td><td><h3 align="left">Advertisements</h3></td></tr></table> <div style='border:1px #121212 ridge; width:50%;'> <div align="left"> <table width=137% border=0> <tr><td> <p><b>Next Ad Refresh</b></p></td><td><p> {$mbs}</p></td></tr> <tr><td><p><b>Current Server Time</b></p></td><td><p> {$cst}</p></td></tr> <tr><td><p><b>Ads Available</b></p></td><td><p> {$ads_av}</p></td></tr> </table> </div> </div> <div align="left"> <p>When viewing an ad, please wait for a green message to appear for your advertisement credit to be issued</p> </div> <div id='ads_js'></div> <div align="left"> <table width=55% border=0> <tr> <td class='bar' width=50%>Advertisements </td> <td class='bar'> Member Clicks </td> <td class='bar'> Outside Clicks </td> </tr> {$ads_show} </table> CONT; ?></div> NOW i want to add some code in this page that First check in the users account that he had advertisement in his account running or not, and IF yes then it checks the EXPIRATION date of advertisement, if advertisement is expired or not runnig then it echo's an error that "YOU HAVE TO TOP-UP FIRST" and if advertisement is not expired then it shows the ads on that page to click. Thanks Shayan Quote Link to comment https://forums.phpfreaks.com/topic/162385-ptc-to-pta-conversion/#findComment-858921 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.