Click here to Skip to main content
15,887,746 members
Home / Discussions / Web Development
   

Web Development

 
QuestionAccess a web page through IP and port no (VS2013, HTML5, AngularJS) Pin
Praveen Raghuvanshi4-May-15 7:25
professionalPraveen Raghuvanshi4-May-15 7:25 
Questionabout classic asp Pin
tiwal3-May-15 7:07
tiwal3-May-15 7:07 
AnswerRe: about classic asp Pin
F-ES Sitecore3-May-15 8:09
professionalF-ES Sitecore3-May-15 8:09 
GeneralRe: about classic asp Pin
tiwal4-May-15 6:47
tiwal4-May-15 6:47 
QuestionEdit the Word Document Which is on the server. Pin
Kandepu Rajesh1-May-15 6:52
Kandepu Rajesh1-May-15 6:52 
QuestionWeb/Mobile project. Expert advise needed for system architecture Pin
Member 116571311-May-15 3:38
Member 116571311-May-15 3:38 
Questionvb.net web form Error:It is an error to use a section registered as allowDefinition='MachineToApp... Pin
dcof29-Apr-15 12:11
dcof29-Apr-15 12:11 
QuestionUpdating Legacy XML Code Pin
BeagleGuy29-Apr-15 10:41
BeagleGuy29-Apr-15 10:41 
I've got a legacy password protected website written in php/xml that I would like to update some of the functionality. Currently, the administrator can create multiple Contract Vehicles (CV) and then create a Task Order (TO) that is linked to a specific contract vehicle. Fields such as TO name, number, description, etc. This information is then linked to a previously created CV via a dropdown list. Upon completion, the content is uploaded to a mysql database.

I'd like to make an enhancement where the site admin can upload a file (i.e., PDF, text, doc, jpeg, tiff, etc.) either when creating a TO or can be added later via an edit function to a specific TO. In both instances the file (file link path) would be displayed for the specific TO.

The TO information is displayed via three (3) different xml pages:
[TO LIST Code]
XML
<form>

    <subtitle>Task Order - File Attachments</subtitle>

    <fields>
        <_count header="No" suffix="." width="30" align="center" />
        <tofiles_title header="Title" align="left" />
        <tofiles_post_date header="Date" type="date" params="M j, Y" align="center" width="100" />
    </fields>

    <header>
        <titles>true</titles>
        <buttons>
            <delete onclick="" button="addnew" >
                <location>index.php?sub=tofiles&action=add&tofiles_relation={RELATION}&tofiles_type={TYPE}&returnurl={CURRENT_PAGE}</location>
            </delete>
        </buttons>
    </header>

    <vars>
        <relation import="$_GET['sup_id'] ? $_GET['sup_id'] : $_GET['product_id']" type="eval" />
        <type import="$_GET['sup_id'] ? '1' : '2'" type="eval" />
    </vars>


    <buttons>
        <delete onclick="" button="delete" >
            <location>javascript:if(confirm('Are you sure you want to delete this record ?')) window.location='index.php?sub=tofiles&action=delete&tofiles_id={NOTE_ID}&returnURL={CURRENT_PAGE}'</location>
        </delete>

        <details onclick="" button="details" >
            <location>index.php?sub=tofiles&action=det&tofiles_id={TOFILES_ID}&returnurl={CURRENT_PAGE}</location>
        </details>

    </buttons>

    <SQL>
        <vars>
            <sql_table import="$this->tables['tofiles']" type="eval"/>
            <relation import="$_GET['sup_id'] ? $_GET['sup_id'] : $_GET['product_id']" type="eval" />
            <type import="$_GET['sup_id'] ? '1' : '2'" type="eval" />
            <sql_condition import="WHERE tofiles_type='{TYPE}' AND tofiles_relation='{RELATION}' " type="var"/>
        </vars>

        <query>SELECT * FROM `{SQL_TABLE}` {SQL_CONDITION} ORDER BY tofiles_post_date DESC</query>
    </SQL>

    <items>100</items>

</form>



[TO DETAILS Code (This is where the Admin/Users could select a link to download the attached file.]
XML
<form>
    <title>T/O Attachment Details</title>
    <action>#</action>
    <name>edit</name>
    <width>580</width>

    <formtag>true</formtag>
    <border>true</border>

    <buttons>
        <set>
            <footer>true</footer>
            <header>true</header>
        </set>

        <return onclick="" button="return" >
            <location>{PRIVATE.FORM_PREVIOUS_PAGE}</location>
        </return>

        <save onclick="" button="edit">
            <location>index.php?sub=tofiles&action=edit&tofiles_id={TOFILES_ID}&returnurl={CURRENT_PAGE}</location>
        </save>

    </buttons>

    <redirect>index.php?sub=users</redirect>

    <vars>
        <returnurl import="urldecode($_GET[returnURL])" type="eval" />
    </vars>

    <fields>


        <user_id type="hidden" hidden="true"/>

        <tofiles_title type="text">
            <title>Title</title>
        </tofiles_title>

        <tofiles_body type="text" valign="top" font="normal">
            <title>Description</title>
        </tofiles_body>

        <subtitle_log type="subtitle" title="Log Data" />

        <tofiles_post_date type="text" action="date" params="F j, Y, g:i a">
            <title>Post Date</title>
        </tofiles_post_date>

        <tofiles_post_ip type="text">
            <title>Post Ip</title>
        </tofiles_post_ip>

        <tofiles_post_user type="relation">
            <title>Post User</title>
            <relation table="users" id="user_id" text="user_login" />
        </tofiles_post_user>

    </fields>
</form>



[FILE ATTACHMENT - Add/Edit (This is where the Admin would "upload" the file)]
XML
<form>
    <title>{PRIVATE.FORM_ACTION_TITLE} T/O - FFFile Attachments</title>
    <action>index.php?sub=tofiles&action=store</action>
    <name>edit</name>
    <width>580</width>

    <formtag>true</formtag>
    <border>true</border>

    <buttons>
        <set>
            <footer>true</footer>
            <header>true</header>
        </set>

        <return onclick="" button="return">
            <location>{PRIVATE.FORM_PREVIOUS_PAGE}</location>
        </return>

        <save onclick="" button="saveall">
            <location>javascript:document.forms[0].submit();</location>
        </save>

    </buttons>

    <redirect>index.php?sub=accounts</redirect>

    <fields>
        <tofiles_id type="hidden" hidden="true"/>
        <tofiles_post_date type="hidden" default="time()" action="eval"/>
        <tofiles_post_user type="hidden" default="$_SESSION[minibase][raw][user_id]" action="eval"/>
        <tofiles_post_ip type="hidden" default="$_SERVER[REMOTE_ADDR]" action="eval"/>
        <tofiles_relation type="hidden" default="$_GET[tofiles_relation]" action="eval"/>
        <tofiles_type type="hidden" default="$_GET[tofiles_type]" action="eval"/>

        <tofiles_title type="textbox" size="35" required="true" validate="A:2:200">
            <title>Title</title>
        </tofiles_title>

        <tofiles_body type="textarea" size="60:5" required="true" validate="A:1:100000">
            <title>Body</title>
        </tofiles_body>

    </fields>



</form>



Once uploaded the admin and other users would be able to select a file link and download the aforementioned document.

So, like I said, this is a legacy Website and I don't have a lot of experience in writing XML code, so I would appreciate anyone who could provide a little insight.
THX!

modified 29-Apr-15 16:52pm.

Questionload image in jsp page Pin
aamirpal@gmail.com27-Apr-15 19:45
aamirpal@gmail.com27-Apr-15 19:45 
QuestionProcess WORD document in the browser Pin
Antonio Guedes24-Apr-15 10:19
Antonio Guedes24-Apr-15 10:19 
GeneralRe: Process WORD document in the browser Pin
Kornfeld Eliyahu Peter25-Apr-15 10:11
professionalKornfeld Eliyahu Peter25-Apr-15 10:11 
GeneralRe: Process WORD document in the browser Pin
Antonio Guedes27-Apr-15 3:29
Antonio Guedes27-Apr-15 3:29 
GeneralRe: Process WORD document in the browser Pin
Sascha Lefèvre27-Apr-15 15:10
professionalSascha Lefèvre27-Apr-15 15:10 
AnswerRe: Process WORD document in the browser Pin
MarbryH11-May-15 3:34
MarbryH11-May-15 3:34 
Questionhow to make single domain license ? Pin
Member 1134468113-Apr-15 3:45
Member 1134468113-Apr-15 3:45 
Questionbenefit of using session id in url Pin
Jassim Rahma11-Apr-15 12:09
Jassim Rahma11-Apr-15 12:09 
AnswerRe: benefit of using session id in url Pin
ZurdoDev13-Apr-15 4:22
professionalZurdoDev13-Apr-15 4:22 
QuestionComparing Back End Languages Pin
anaQata10-Apr-15 0:49
professionalanaQata10-Apr-15 0:49 
QuestionWHERE TO GET STARTED IN WEB DEVELOPMENT... Pin
anaQata9-Apr-15 0:33
professionalanaQata9-Apr-15 0:33 
Questionmy website why slow Pin
Member 115926808-Apr-15 21:17
Member 115926808-Apr-15 21:17 
SuggestionRe: my website why slow Pin
Richard MacCutchan8-Apr-15 22:21
mveRichard MacCutchan8-Apr-15 22:21 
Questionhow to preview docx file in java, struts2 architecture? Pin
Ananth Bhat8-Apr-15 9:10
Ananth Bhat8-Apr-15 9:10 
AnswerRe: how to preview docx file in java, struts2 architecture? Pin
Richard MacCutchan8-Apr-15 20:24
mveRichard MacCutchan8-Apr-15 20:24 
QuestionHow to OUTPUT using PDO and PHP Pin
Jassim Rahma8-Apr-15 8:48
Jassim Rahma8-Apr-15 8:48 
QuestionWant to know that how fetch data from excel and paste a unique code in 50 websites on a one common page. Pin
Member 115882647-Apr-15 8:31
Member 115882647-Apr-15 8:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.