|
47_MasoN_47 wrote: Suggestions on what to try next?
Show some code.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
<?php
// Connecting to MySQL and selecting the xxx database
include 'it-opendb.php';
// Authentication - not secure...needs work
$adminPass = $_REQUEST['adminPass'];
if ($adminPass == "xxx") {
// Retrieve data from xxx database - xxx table
$request = mysql_query("SELECT * FROM xxx") or die(mysql_error());
// CSS statment
echo "<link rel='stylesheet' type='text/css' href='admincss.css' />";
// Display retrieved data with while loop
echo "<div id='itlisttableadmin'>";
echo "<table border='1'>";
echo "<tr> <th>Case #</th> <th>User Name</th> <th>Date Requested</th> <th>Date Required</th> <th>Problem</th> <th>Status</th></tr>";
while($row = mysql_fetch_array($request)){
// Print out list of IT requests into a table
echo "<tr><td>";
echo $row['id'];
echo "</td><td>";
echo $row['userName'];
echo "</td><td>";
echo $row['dateRequested'];
echo "</td><td>";
echo $row['dateRequired'];
echo "</td><td>";
echo $row['problem'];
echo "</td><td>";
echo $row['status'];
echo "</td></tr>";
}
echo "</div>";
echo "<div id='changeStatus'>";
echo "<form id='adminStatus' action='adminStatus.php' method='post'>";
echo "<p><label for='case'>Case #: </label><input type='text' maxlength='4' name='case' id='case' /></p>";
echo "<p><label for='newStatus'>New Status: </label><input type='text' name='newStatus' id='newStatus' /></p>";
echo "<p><input type='submit' name='adminStatusSubmit' id='adminStatusSubmit' value='submit' />";
echo "</form>";
echo "</div>";
echo "<div id='changeUser'>";
echo "<form id='adminUser' action='adminUser.php' method='post'>";
echo "<p><label for='case'>Case #: </label><input type='text' maxlength='4' name='case' id='case' /></p>";
echo "<p><label for='newUser'>New User Name: </label><input type='text' name='newUser' id='newUser' /></p>";
echo "<p><input type='submit' name='adminUserSubmit' id='adminUserSubmit' value='submit' />";
echo "</form>";
echo "</div>";
echo "<div id='changeRequired'>";
echo "<form id='adminRequired' action='adminRequired.php' method='post'>";
echo "<p><label for='case'>Case #: </label><input type='text' maxlength='4' name='case' id='case' /></p>";
echo "<p><label for='newDRequired'>New Date Required: </label><input type='text' name='newDRequired' id='newDRequired' /></p>";
echo "<p><input type='submit' name='adminRequiredSubmit' id='adminRequiredSubmit' value='submit' />";
echo "</form>";
echo "</div>";
echo "<div id='changeRequested'>";
echo "<form id='adminRequested' action='adminRequested.php' method='post'>";
echo "<p><label for='case'>Case #: </label><input type='text' maxlength='4' name='case' id='case' /></p>";
echo "<p><label for='newDRequested'>New Date Requested: </label><input type='text' name='newDRequested' id='newDRequested' /></p>";
echo "<p><input type='submit' name='adminRequestedSubmit' id='adminRequestedSubmit' value='submit' />";
echo "</form>";
echo "</div>";
}
else {
echo "Wrong Password - Try again";
}
?>
|
|
|
|
|
Do you have a doctype, a html element, a head element and a body element, or is that all the code?
There are elements using implicit end tags as in XHTML, but the code is not at all valid XHTML.
There is no end tag for the table, which in itself may very well mess up the page.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
That is all the code. Since it's PHP I didn't think about having a doctype and whatnot.
I'll make some changes and just see what happens. Thanks for the suggestion, even if it doesn't fix it at least that's one more step making the code more valid.
|
|
|
|
|
47_MasoN_47 wrote: That is all the code. Since it's PHP I didn't think about having a doctype and whatnot.
That means that what you are sending to the browser isn't even close to be a valid html document, or even an html document at all. The browsers makes their best to try to display it as html anyway, but you can't expect it to work properly.
To be an html document, the page has to have a html, head, title and body tag:
<html>
<head>
<title>Minimal</title>
</head>
<body>
A minimal html document.
</body>
</html>
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Yeah I generally write valid XHTML 1.0 Strict, I just didn't think about it since it was inside PHP. I taught myself PHP and am still learning a lot. I have a strong feeling that is what the problem is. Over the weekend I'm going to go through each piece of this site and change it so that it's valid.
Thanks a lot for the suggestion, I never would have thought about the browser being so confused at what I was trying to display.
|
|
|
|
|
For the record, after adding the proper tags to the HTML generated by the PHP and putting the end tag on the tables it fixed the problem. Now Firefox and Opera are both displaying the page in the same way.
|
|
|
|
|
Hi to all!
I've got some stupid question but i just can't figure it out.
I've working with ASP.NET for some time but i never have to make web application with user roles. So i began to work and place login control, create few users and roles but then i stop because i didn't know how to make some components on page to be enable(or invisible) for one role and disable for other role. I search about the problem and only answer i found is that roles in asp.net is based on folder security. So when logged user is with role manager i redirect him to Managers\Sales.aspx but when logged user is with employee role i redirect him to Employee\Sales.aspx. And this two pages are different - some controls are enabled (or invisible).
So my question is - is this the only way to achieve or i can do it "stupid" way - check logged user role and with some "if" enable (or hide) some controls?
Sorry again i know that this is a stupid question but i have to ask
King Regards!
countNazgul
|
|
|
|
|
Watch these videos[^] for a start if you have not.
I use a combination of approaches. One is my menu system has role tags so various functions are not visible to some users. This is also supplemented with web.config files in subdirectories that control access to the subdirectory. This works where the whole page is restricted to a set of roles.
When you get down to single pages that need to be different for various roles, there are two approaches.
One is that I have code in Form.Load that hides/shows different panels/controls according to which roles a user is in.
The second is that I wrote a RolePanel control that subclasses the panel control, and hides itself if a user isn't in the specified roles. This makes it easier to do the security declaratively rather than writing code.
'Howard
|
|
|
|
|
Hi All,
I am Classic ASP programmer(vb script/java script) and developing a news site and i have to display news contents in hindi & english , In english there no problem to displaying but i am worry about displaying content in hindi.
Kindly suggest me how i can stored/retreive hindi content from database as well as display .. you can refer amarujjala.com.
What are the various method to display bilingual content on classic ASP pages.
Waiitng for your response.
Thankyou
Life is not easy ,let's make it.
|
|
|
|
|
I'm using MySql and PHP.
I'm a Persian.
Whenever I wanna store/retrieve data to Mysql In Persian I've created a table with this syntax in MySQL.
CREATE TABLE `test`.`table1` (
`Field1` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_polish_ci NOT NULL
.
.
.
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_persian_ci
I think you should change your fields languages in SQL.
You should change utf8_persian_ci with Hindi.
|
|
|
|
|
Thx Persian,
Really ur suggetion is quite good but when u echo the table value is it show on browser in hindi ?
Should i setting something in IIS?
Can i store both (English and Hindi ) content with table column as "CHARACTER SET utf8 COLLATE utf8_polish_ci NOT NULL".?
waiting for ur response.
Rajesh
Life is not easy ,let's make it.
|
|
|
|
|
asprajesh wrote: Really ur suggetion is quite good but when u echo the table value is it show on browser in hindi ?
Should i setting something in IIS?
I don't know , because I've not worked with IIS, I've usually worked with Apache.
asprajesh wrote: Can i store both (English and Hindi ) content with table column as "CHARACTER SET utf8 COLLATE utf8_polish_ci NOT NULL".?
You should try it, and see the result.
|
|
|
|
|
I have applied CSS in Crystal Report10, it is working when i export the report in HTML Format, but it is not working when i export in PDF Format. If any have the solution plz send me........Thx.....
|
|
|
|
|
Does anyone know of an event that fires when a value is set on an element from within JavaScript? Example: $get('id1').value = $get('id2').value (copy values between input controls). Is there an event that will fire on control 'id1' when it is modified this way?
Thanks,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|
|
I am not a javascript expert but I think the answer is no.
You could instead have a function that updates id1, e.g. setID1(value) and then it could do the work of the event handler you want.
'Howard
|
|
|
|
|
Thanks for your answer. It was what I expected, but I want to know how in a world of security, there is not a way to see when your values have changed by someone other than the user.
Thanks,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|
|
Javascript runs on the browser.
You can assume absolutely nothing about the browser or its security.
It would be easy enough with modern debugging tools like FireBug etc to stop a javascript function, change some values and continue.
Keep all sensitive information on the server.
'Howard
|
|
|
|
|
Actually I ready keep the sensitive information on server only, but there comes a time when knowing when an element has changed a value could be useful. I find the reasons more compelling as I use AJAX and client side scripting. An example would be for an extender control that needs to do some action when the control that it has extended (i.e. text input) has had its value changed is used to set other internal things within the control. If there was a trigger that fired when this happened, you would not force a programmer to use your behavior to set things up when the value changed. I know that under the current paradign this is not a common occurance, but in the future it could become a greater problem in making more user friendly applications. Just my thoughts.
Thanks for your time,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|
|
i will explain my problem.
I have one.html, from one.html if i click next then go to two.Html next click three.html.
In two.html,three.html i have GOMain link then it will move to again one.html.
Same way,Lets take 100.html .101.html,103.html
think One.html,100.html are Main Pages . From These Main pages navigation will start to next next pages whereever if i click Back TO Main then it should come to Main page , 100.html or One.Html
One important thing:
One.html,100.html Main pages also not fixed,these are Dynamically Created Pages.
thanks.
GOVIND
|
|
|
|
|
use Windows.History() to acheive this
and have a look on History.Forword(1), History.Forword(2) , History.Go()
This will help you.
|
|
|
|
|
hi, i have this console application which is ment to synchronize data using CRM webservice.
that application went well until just now, there was an error occured. when i traced the
error it was on the retrievemultiple method. the error code is 0x80040216, it says "An
unexpected error occurred. Platform." before that the only error message that i got is
"Server was unable to process request"
i'm really stuck on this issue, i got confused because when i tried to update the web
references, the CRM server somehow did not respond, so i failed to update the web
references. after i reset the IIS on the server, i was able to update the web references.
the web reference i'm using is CRMService and MetadataService. could anybody help me??
thanks in advance.
|
|
|
|
|
I use following code of in ASP, and the respective JavaScript
first 2 line of JavaScript working well
but JavaScript onMouseOver is not working
Please help
HTML code in ASP
Javascript code
document.getElementById("tempimg1").src = image;
document.getElementById("cmbSkin1").value = name;
document.getElementById("tempimg1").onMouseOver = function(){showtrail("\'"+ image +"\'"+,+"\'"+ name +"\'"+,+430,438)}
I also used follwing
document.getElementById("tempimg1").onMouseOver = showtrail("\'"+ image +"\'"+,+"\'"+ name +"\'"+,+430,438)
document.getElementById("tempimg1").onMouseOver = "showtrail("\'"+ image +"\'"+,+"\'"+ name +"\'"+,+430,438)"
I also searched on google
Applied logic, but not succeed
Please help
Amit Battan Ror
battan20@gmail.com
|
|
|
|
|
I am using
<a href="#" onMouseOut="rollOutImage('imgHome')" onMouseOver="rolloverImage('imgHome');"><img id="imgHome" style="border:0px" src="Images/btn_home.jpg" alt="Home"></a>
And it is working fine.
The one u are using and the one i am, the difference is in Case.
Please try it, as i am not facing any issue
|
|
|
|
|
Hi,
I have 2 divs next to each other. They are each 50% wide. It works fine. In the left div I have a header text which is 20px, and in the right div I have text that is 13px. Now because the left div is higher, the right div's text is displayed at the top, it's not vertically centered. How do I get the right div to display in the middle vertical alignment? I tried vertical-alignment:middle but it does not work.
Please can someone help?
Thanks
Brendan
|
|
|
|