james182 Posted August 15, 2008 Share Posted August 15, 2008 I'm trying to build a site with the below functions. Any help on ones that exist or help on building it would be great. - Be able to Display files - Browse Categories - Rating system, - Manager users/ verify email when registering - be able to deposit money with Paypal - Monitor sales - money/credit left - Affiliate program to give 50% for referals 1st time. - Secure download of files bought - Send email to the buyer when a file is updated - Search box - Similar website template - Recent/popular/search at homepage - Need installer how would you do the pending queue of files waiting to be approved???? Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/ Share on other sites More sharing options...
Fadion Posted August 15, 2008 Share Posted August 15, 2008 Thats a lot ure asking and appart from telling a script which has some of the features, no one can really help u here. I would ask u how much knowledge u have on web development so u are willing to start on such a site? If not too much, then its time to learn i guess . For your question, i dont really understand the use of files to be approved, bought or sold. What files are u refering to? As for the pending queue, u can have a table for files which holds the filename, any extra data and a status field. Once the file is uploaded the status field is update to "status: approved". Thats the base concept. If u want any other help on creating specific features feel free to ask, but telling how to create each of those u asked for would need a long essay. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-617712 Share on other sites More sharing options...
james182 Posted August 16, 2008 Author Share Posted August 16, 2008 Ok point taken. so how would you create a file approval queue, with progress in queue e.g: 53 out of 100, and is updated everytime a file is accepted or rejected. process: file upload to queue list > administrator approves (goes to new table of files) or rejects (gets deleted) file > queue is updated. USER 1 might be 53 out of 100 and USER 2 might be 30 out of 100 After updated due to file being approved or rejected > USER 1 might be 52 out of 100 and USER 2 might be 29 out of 100 Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-617733 Share on other sites More sharing options...
Fadion Posted August 16, 2008 Share Posted August 16, 2008 I think you should first start designing your project by outlining what functionality u will have. Keep it as simple as it can be as u can add more advanced features once u learn new stuff. I doubt this queue thing will block u from coding the site, so let that go and start the project as it has to be. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-617745 Share on other sites More sharing options...
spasme Posted August 16, 2008 Share Posted August 16, 2008 You'll have alot of work cut out for you ... If you're just starting with PHP i'd sugest using a ready made CMS or something. From my experience using Joomla with certain modules (DOCman) would cover most of the features you need. Their free and easy to install and understand. From what i remenber it does have a pending queue of files waiting to be approved. Google it and see if it has all the features you'll be needing. In my oppinion it might pe easier to customize the modules you suite your needs than to start from stratch. Cheers. (hope this isn't considered advertising) Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-617753 Share on other sites More sharing options...
Gighalen Posted August 16, 2008 Share Posted August 16, 2008 www.e107.org Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-617820 Share on other sites More sharing options...
james182 Posted August 16, 2008 Author Share Posted August 16, 2008 ok but how would you create a file approval queue, with progress in queue e.g: 53 out of 100, and is updated everytime a file is accepted or rejected. USER 1 might be 53 out of 100 / USER 2 might be 30 out of 100 > After updated due to file being approved or rejected > USER 1 might be 52 out of 100 / USER 2 might be 29 out of 100 Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618146 Share on other sites More sharing options...
Mchl Posted August 16, 2008 Share Posted August 16, 2008 Store information about pending files in mysql table (together with time when the file was submitted). When the file is accepted/rejected remove it from this table. When displaying queue order files by submit time. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618158 Share on other sites More sharing options...
DeanWhitehouse Posted August 16, 2008 Share Posted August 16, 2008 If you want it updated automatically , without reloading the page, you will need ajax Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618162 Share on other sites More sharing options...
spasme Posted August 16, 2008 Share Posted August 16, 2008 Ok, if you insist on doing this yourself... This part is about designing you DataBase. You'll want to have a table for your users and the corresponding details and a table to store your file's information. Each user shlould have and unique ID field (auto increment or auto generated) or something. The file's table should have an "owner" and "approved" field so you can keep track of your stuff... So... when a user Posts/Uploads a file, it's name and details go intro the files table along with the owner ID. You will probably be using a form to let your users post the files. You can include a hidden fiend with name="approved" and value="no" and one with the name="owner" value="username" (use SESSION to get username) The idea behind this is that once the user submits the form the file will automatically be marked in your file's table as waiting to be approved . To view the pending files you would then simply (pending.php) SELECT * FROM `files` WHERE approved='no' ... (COUNT,GROUP...) whatever else you need to sort Whis will then echo out all the files pending approval. Once you have them echoed you cand simply echo a link next to each filename with actions (Edit, Delete, ..., Approve) these links might look somenthing like this: <a href="actions.php?action=approve&id=$sql[id]">Approve</a> In actions.php you simply use a CASE function based on the action variable in the URL and execute SQL stuff based on that. After approving a file you could redirect yourself back to the pending.php and so on ... Hope this helps (and makes sense). I can give you an example of an actions.php i from one of my latest projects. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618163 Share on other sites More sharing options...
Mchl Posted August 16, 2008 Share Posted August 16, 2008 You can include a hidden fiend with name="approved" and value="no" and one with the name="owner" value="username" (use SESSION to get username) Don't do that. How difficult would it be to hack this into name="approved" and value="yes"? Such variables should be treated server-side. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618168 Share on other sites More sharing options...
spasme Posted August 16, 2008 Share Posted August 16, 2008 Don't do that. How difficult would it be to hack this into name="approved" and value="yes"? Such variables should be treated server-side. OK, don't do that. I'm not so good with security. It was just an example. @Mchl -- an example would probably be most welcomed. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618173 Share on other sites More sharing options...
james182 Posted August 16, 2008 Author Share Posted August 16, 2008 ok but who would you get it to display: You are currently 22 out of 50. my code: <? include ("connect.php"); $user = $_GET['user']; $result = mysql_query("SELECT * FROM queueItems "); $resultUser = mysql_query("SELECT * FROM queueItems WHERE user = '$user' "); $num_rows = mysql_num_rows($result); ?> <p>The following files of yours are awaiting approval:</p> <table class="general_table" cellpadding="0" cellspacing="0"> <thead> <tr class=""> <td>Name</td> <td>Progress in Queue</td> <td>Uploaded</td> <td> </td> </tr> </thead> <tbody> <? $i = 1; while($r=mysql_fetch_array($resultUser)){ $user=$r["user"]; $file_name=$r["file_name"]; $qid=$r["qid"]; $curr_position = $i; ?> <tr class=""> <td><?=$file_name?></td> <td><?=$curr_position?> out of <?=$num_rows?></td> <td>1 day ago</td> <td><a href="#" onclick="return confirm('Are you sure?');">Delete</a></td> </tr> <? } $i++; ?> Any examples would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618174 Share on other sites More sharing options...
DeanWhitehouse Posted August 16, 2008 Share Posted August 16, 2008 you would have there que number stored in the db , and echo it out Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618175 Share on other sites More sharing options...
james182 Posted August 16, 2008 Author Share Posted August 16, 2008 Any examples would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618204 Share on other sites More sharing options...
DeanWhitehouse Posted August 16, 2008 Share Posted August 16, 2008 how can i give an example, just store the que number in the db then echo the result. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618205 Share on other sites More sharing options...
james182 Posted August 16, 2008 Author Share Posted August 16, 2008 how do you store & get the que number??????? look at my code i posted Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618225 Share on other sites More sharing options...
DeanWhitehouse Posted August 16, 2008 Share Posted August 16, 2008 As i have said , you store it in the DB. And second if you wrote the code below this should be simple ,and third i am not writing the code for you. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618226 Share on other sites More sharing options...
Fadion Posted August 16, 2008 Share Posted August 16, 2008 Just an opinion as I'm not very sure how's the queue going to work. You can have a table for files, which stores the file's id, path, title, comments and whatever it needs to have. Add also a field for status, which can have 0: in queue, 1: approved, -1: declined. The queue can be determined by the file id, as normally the greater the id, the higher is the file on queue. To illustrate, a query like this should have the work done: <?php $fileid = 24; $results = mysql_query("SELECT COUNT(id) AS queue FROM files WHERE file_id<$fileid AND status=0") or die(); $values = mysql_fetch_array($results); echo $values['queue']; //or probably: echo $values['queue'] + 1 ?> Hope this helps. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618239 Share on other sites More sharing options...
james182 Posted August 17, 2008 Author Share Posted August 17, 2008 cool thanks, but a little info thanks as im am confusing myself. Quote Link to comment https://forums.phpfreaks.com/topic/119907-flashden-style-site/#findComment-618492 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.