FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Need A Custom Script Developed !!! Payin Good !!!!





salman_500
hey guyz,
thnx for your time readin this....

Trust me... Its not as long as it looks Very Happy Very Happy Cool Laughing

well here goes...

what i need is a script that can be integrated into my template...so first ill go about the structure...then ill tell how it should work...

so as for the structure you see that as this script will be to upload a couple images and send data into database.... it has to be named as :

add_template.php

it is located in this folder :

root/administration/

now as i use dreamweaver to apply templates to pages i need the script to be clean.. i mean that all should be include in the file "add_template.php" preferably by using the "switch" function and naming the cases appropriately.. however the script cannot go into cases... cases should use include funtion to include the appropriate page into that case.. the files containing the script should be placed in a sub folder :

includes/

the cases should include all these pages :

case 'addnew':
add_template?mode=addnew
(containing inlude to a script that is described below)

case 'edit':
add_template?mode=edit
(containing script to adit existing records)

case 'delete':
add_template?mode=delete&deleteid="id here"
(containing script that would delete the record with id mentioned in the url.. there should however be a confirmation message ..
e.g " Are you sure you want to delete this record : Yes || No")

case 'list':
add_template?mode=list
(should display all the records in an organized way)

this list section has to have another sub section:

add_template?mode=list&detail="id here"
to show details of the records showin in "list"



ok now for the :
"add_template?mode=addnew"

ok now this is the main part that needs explanation...

you see this page has to be a forem... and yet again this should also use include feature to include a "addnew.htm" page that contains form.. (easy config later) .... it should have fields for the following table : (SQL)

(NOTE :
Connection to be made by including :
root/Connections/solothemes.php)


Code:

table name : templates

  `id` mediumint(9) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `category` varchar(255) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  `resolution` varchar(255) NOT NULL default '',
  `authur` varchar(255) NOT NULL default '',
  `website` varchar(255) NOT NULL default '',
  `image` varchar(255) NOT NULL default '',
  `thumb` varchar(255) NOT NULL default '',
  `download_link` varchar(255) NOT NULL default '',
  `addition_date` varchar(255) NOT NULL default '',

Primare : id


ok now as the table shows exact name of fields....they should be named the same way in form...

you are to use upload feature to upload the images linked to from "image" field and "thumb" field.... the uploaded images are to be placed in this folder:

root/modules/templates/images/

root/modules/templates/thumb/

however...the thumbnail has to be resized before saving...to :

150px * 150px

(if you have a way by which only image has to be uploaded...and it can be resized and display as thumb, without loading the whole image..you can use that)

the rest of the field go normal into the databse... bute image name has to be entered into database too... it is to be renamed to the id of the record... like record "43" should have image "43.gif" etc.....

after entering : "Successfully uploaded. View it here:

add_template?mode=list&detail="id here"

.."

one important thing.... DO NOT make use of "exit;" feature.... make use of "if" and "else" statements to quit the script...im sure you know how....coz exiting script exits the whole page...ruining the template...

well i hope you got it.....and will be ready to do it for me...coz if you do...im ready to shower you with 200+ frih$'s depending upon the cleanliness of the script...and the time taken for you to bring it up to me...

thnx alot !!!

post here and tell if ur working on it...

plz do a complete script.... do not leave spaces with comments that i am to do this here...

thnx alot in advance.....

Very Happy Very Happy
salman_500
cmon guyz.... Confused

any1 ??? Sad

im payin good...
Rhysige
Specify what paying good is.... frih$ or proper $$$
jabapyth
im workin on it...
should the
Code:
add_template?mode=list
lits ALL the users in the mysql table?
salman_500
jabapyth wrote:
im workin on it...
should the
Code:
add_template?mode=list
lits ALL the users in the mysql table?


Sweeeeet !!! Very Happy

Thnx !

well about the list... you can make it so that it displays 20 records or so at a time... with option to change the "20" value.... otherwise... if you cannot do this...i dont mind having all in one page...

Thnxx yet again..

thank you soo much !!!
jabapyth
i wouls just need a few more variables ["add_template.php?mode=list&per=20&page=1"]

if there are more than 20, the "page" variable denotes which mult of 20.
Quote:

(NOTE :
Connection to be made by including :
root/Connections/solothemes.php)

what is this? does this connect to the server? what varibles does it use?
salman_500
jabapyth wrote:
i wouls just need a few more variables ["add_template.php?mode=list&per=20&page=1"]

if there are more than 20, the "page" variable denotes which mult of 20.
Quote:

(NOTE :
Connection to be made by including :
root/Connections/solothemes.php)

what is this? does this connect to the server? what varibles does it use?


well..i dont wuite get wat you mean by the first part.... but here is what the "solothemes.php" file has in it....

Code:
<?php
$conn = mysql_connect('localhost', 'root') or die(mysql_error());
           if (!mysql_select_db('solothemes')) die(mysql_error());
?>


these are curent setting for me to conect to database on localhost (my computer) .... i want all conections made by using this file so that when i upload the site..i only have to change one file in order to change all Smile

thnx yet again ! Cool
salman_500
hey..

once again...thnx for doing this....really i mena it...

i was wonderin that how much is it complete...like as in...how would u say its complete in %

thnx for now..

and a BIG THNX in advance ! Very Happy
jabapyth
im mostly done, but.. whats download_link? (is it user specified?)
and you spelled author wrong (in thw mysql). should i as well?
jabapyth
do you want a max-filesize?
salman_500
jabapyth wrote:
im mostly done, but.. whats download_link? (is it user specified?)
and you spelled author wrong (in thw mysql). should i as well?


ohh..
i forgot to mention that part.......sorry my bad....

well you see...the download_link is actually supposed to upload a file specified to a folder... like just like its done with the images...it it suposed to upload the specified, .zip, .rar etc. files to this folder:

root/modules/templates/files/

...err dont set a max file size for this.... and i dont think you will need it for others..... an include though... if you can make it happen this way that when it uploads the main image ..it resizes it to somthin less than "800 x 600" ... but make it so that it keeps the ratio... like so that the image is not stretched or anything.....

well i think that is it for thi part...

but i was wondering somthing... do you know any of "ajax" ...

Thnx in advance !! Cool

i really owe you @!@!@! Very Happy
jabapyth
yes i know some ajax, and what should i call the "download_link" file?
salman_500
jabapyth wrote:
yes i know some ajax, and what should i call the "download_link" file?


the downlin_link file should be named the same as the id of that record.... just like record 43 should have image "43.gif" and file "43.zip" etc....

and yea...like if you knwo what your doing in ajax.... you can really add about a 100 more frih$'s to your bill if u can add stuff like

Uploading File:
73% done
|-------...|

somthin like this but a lil more user-friendly......

thxx.... if you cant do the ajax part...just forget it... its not compulsory..

Thnx Yet AGAIN !! Very Happy
jabapyth
i just relized... you dont need the image name, or the download name, or the thumb name in the database.

image name= ${id}.gif
thumb name=${id}_thumb.gif (yes i can resize it in PHP)
download name=${id}.zip
kv
This is off topic, but I am very curious to know. Why will people put that much time and effort to develop scripts for somebody else in exchange for frih$s? I can understand if it is typing a piece of code just to help other members but not writing complete custom working script with error handling and all. I have lot of frih$s but don't know what to do with it.
salman_500
jabapyth wrote:
i just relized... you dont need the image name, or the download name, or the thumb name in the database.

image name= ${id}.gif
thumb name=${id}_thumb.gif (yes i can resize it in PHP)
download name=${id}.zip


oh yea ... clever Wink

hey 1 thing./..since your going to be puttin it in that easy... can you please make the id not simple "43", "23" or "1" ... can it be more like a 5 digit code with random numbers and alphabets..... more like "0A3B5", "0H3L5" etc...

Thnx... !! Very Happy
tell me if you are willing to do the ajax part !

Thnx yet again ! Very Happy Shocked Razz

and for the guy who posted above..... well... its probably more dependant upon how willing you are to do it rather than the desire for frih$'s... Courtesy, Generousity or Frendlines in other words... on the other hand the guy who you are helping gives you frih$'s to show his Gratitide and Thankfullness.... and thats probably it...i guess.....
jabapyth
kv wrote:
This is off topic, but I am very curious to know. Why will people put that much time and effort to develop scripts for somebody else in exchange for frih$s? I can understand if it is typing a piece of code just to help other members but not writing complete custom working script with error handling and all. I have lot of frih$s but don't know what to do with it.


I dont do it for the frih$, its the prectice, the satyisfaction, the sense of accomplishment...yah.


Salman_500

The id should be random? ill need to modify the code i sent you.
also.. i cant do %done w/o extra modules installed, but what i can do is a little "loading gif" that stops when the upload is complete.
salman_500
hey,


are you still working on it....

how much is it done.... near completion???

man im really greatfull Very Happy Surprised Cool

thnx ! Razz
jabapyth
done. i pmed you the link
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.