|
Hiya everyone,
So yes, as the title states, I'm trying to protect images on a website from being downloaded directly (privacy problems).
What I've done (or am trying to do) is something like <a href='img.php?file=blah.jpg'> . However, in img.php, I don't know how to tell if the image is being requested in the actual page (index.html, lets say) with the <a> tag, or if it's requested seperately by someone who's copied that url and viewed it (in a different window, maybe). I've tried $_SERVER['REQUEST_URI'] but that returns img.php?file=blah.jpg under both circumstances.
Is there any way I can find out?
Thanks in advance.
|
|
|
|
|
You could check $_SERVER['HTTP_REFERER'] - that should give you the URI of the page that referred to the image, as long as the user's browser doesn't have referrer sending switched off.
|
|
|
|
|
Why Boonex is a scam?
Boonex problem nr1. No coding standard
Boonex is writen by several people using different technologies. Its main base (Dolphin) is writen in pure php with its own template engine and forum (Orca) uses xlst. That has large negative impact to integration of forum in site and site in forum. When coding, please use single technology and template system.
Whats even worser, different parts of dolphins code itself is writen by completely different people, and very in the hurry. So everyone has its own imagination how to interact with different parts of the code. It is very tricky to modify code that way to suit site needs.
Boonex problem nr2. Template engine and separation of code/design/database
This problem in dolphin/boonex needs a point on its own. Boonex uses custom template system ( that should be called layout system). The blocks of generated html code are pased to specific places in the template. That creates a big headache for programers as they need to search through code for the place where some box is generated. It might be generated in template, or in specific function in one of numerous includes. And so on. Even pligg has better templating than this.
It is very tricky to rip boonex templating apart, as whole coding is based on such poor programming practice. They would be better off using existing template system like smarty or similar one.
This leads to problem nr3
Boonex problem nr3. Crapy use of Database
We saw serveral other competing sites launched on boonex, but we did not care much. Why? Becouse when they reach 500-1000 daily visitors they will break apart. The reason for it is very bad programming and use of database.
For example, boonex uses profile builder which assigns fields to profiles. So the output of profile uses more than one table and is quite inefficient.
Also, there is a nice 20-30 query overhead on each page display to fetch all the configuration values from table. Silly, isn’t it ? They would be FAR better of using a file for configuring sofware or caching it in php file like it is done in most of the systems.
Another simple problem. When boonex wants to display a profile being online it additionally check database for its status. But that data was pulled from database already. So 20 useless queries again.
Resume
I would not suggest using boonex if you want to keep your programmers sane. We have have changed the code almost completely for now, and you will need to do that too. Boonex is a scam. Try googling "boonex scam" first.
|
|
|
|
|
|
|
$PP=$_POST['PurchaserPrice'];
$PQ=$_POST['PurchaserQuantity'];
$PST=$_POST['PurchaserSubTotal'];
$total2=$_POST['total2'];
$id=$_REQUEST['id'];
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$f1=mysql_result($result,$i,"item");
$f2=mysql_result($result,$i,"qty");
$f3=mysql_result($result,$i,"Price");
$f4=mysql_result($result,$i,"sub_total");
$f5=mysql_result($result,$i,"Remarks");
$f6=mysql_result($result,$i,"Approve");
echo "$remarks[i],$PP[$i],$PQ[$i],$PST[$i]";
mysql_query("UPDATE tbl_orders SET Approve='1',PurchaserRemarks='$remarks[$i]',PurchaserPrice='$PP[$i]',PurchaserQuantity='$PQ[$i]',PurchaserSubTotal='$PST[$i]',newtotal='$total2' WHERE id='$id',item='$f1',qty='$f2',Price='$f3',sub_total='$f4',Remarks='$f5'");
I have this query but It wouldn't write in the database
|
|
|
|
|
I don't know if you really need all those fields in the WHERE clause, but if you do they should be separated by AND s instead of commas:
UPDATE tbl_orders SET Approve='1', PurchaserRemarks='$remarks[$i]',
PurchaserPrice='$PP[$i]', PurchaserQuantity='$PQ[$i]',
PurchaserSubTotal='$PST[$i]', newtotal='$total2'
WHERE id='$id' AND item='$f1' AND qty='$f2' AND Price='$f3'
AND sub_total='$f4' AND Remarks='$f5'
You should check the return value from mysql_query , then if it fails you can use mysql_error to find out why.
|
|
|
|
|
Hi all.
At the following URL http://blogs.food24.com/Natreen[^], there is/should be an image that must load within the header section of the page. You will notice the header image loads, then disappears.
This only happens in IE, and the path to the image is valid and done via css. View source to see
Can someone please assist?
Thanks
|
|
|
|
|
When I download the page, the background image url is set to ..\images\24topfile_bg.png"
After copying the file to the same folder as all of the other files and adjusting the img url, the bg works in chrome and ie6 just fine.
Still, I can't see why that should make even the slightest iota of difference. :puzzled:
|
|
|
|
|
I have two data grids in a page...both has check box column(for check & uncheck all)...
header template check box id checkall(dg1) & checkall1(dg2)...
item template check box id chkdelete(dg1) & chkdelete1(dg2)...
when i click checkall(dg1) even check boxes in dg2 are selected...but when i click checkall1(dg2) only dg2 is clicked...
this is js i'm using...i know there is a silly mistake, but donno where to fix it...
(dg1)
function CheckAllDataGridCheckBoxes(CheckBoxControl)
{
var frm = document.forms[0];
if (CheckBoxControl.checked == true)
{
var i;
for (i=0; i<frm.length; i++)
{
if (frm.elements[i].name.indexOf('chkdelete')!=-1)
{
document.forms[0].elements[i].checked = true;
}
}
}
else
{
var i;
for (i=0; i<frm.length; i++)
{
if (frm.elements[i].name.indexOf('chkdelete')!=-1)
{
document.forms[0].elements[i].checked = false;
}
}
}
}
(dg2)
function CheckAllDataGridCheckBoxes1(CheckBoxControl)
{
var frm = document.forms[0];
if (CheckBoxControl.checked == true)
{
var i;
for (i=0; i<frm.length; i++)
{
if (frm.elements[i].name.indexOf('chkdelete1')!=-1)
{
document.forms[0].elements[i].checked = true;
}
}
}
else
{
var i;
for (i=0; i<frm.length; i++)
{
if (frm.elements[i].name.indexOf('chkdelete1')!=-1)
{
document.forms[0].elements[i].checked = false;
}
}
}
}
|
|
|
|
|
The online visible difference is on this line;
if (frm.elements[i].name.indexOf('chkdelete')!=-1)
Compared to
if (frm.elements[i].name.indexOf('chkdelete1')!=-1)
Could it be that the first should point to "chkdelete2" or something similar?
I are Troll
|
|
|
|
|
yea after changing that...it got fixed...after posting it, i thought of that
thanx bro...
|
|
|
|
|
You're welcome
I are Troll
|
|
|
|
|
I have an asp page with two repeaters on it that each contain a ul list that I bind in the Page_Load method when the page loads and everything works hunky dorey. Once the page is loaded I use JQuery to move the items from one list to the other an example of what I am doing can be found here[^], and that works great. When I submit the page I pass the information regarding what items where moved etc.. using a hidden field and can access it server side just fine. But my problem lies in that the OnItemDataBound does not get called when a post back is done and even if it did I think it would be out of sequence and I would not be able to do the binding that way either. So my question is, is there a way using ajax or whatever to get the repeaters to rebind somehow.
I hope this makes sense
Thanks,
Mike
"It doesn't matter how big a ranch ya' own, or how many cows ya' brand, the size of your funeral is still gonna depend on the weather." -Harry Truman.
Semper Fi
http://www.hq4thmarinescomm.com[ ^]
My Site
|
|
|
|
|
I want to understand how I can difference two request which were rised at the same time??
for example:User A want to buy some product and this product has price for example 5$, this User has only 10$ and increase price to 10$ but at the same time another User B increases price too, and his request postback faster than User A, because A has Slow internet...When A's request at last reaches to the server price is already changed and it's 10$ because of B and after that it will be 15$...
sorry for my English
C# Developer
|
|
|
|
|
I need to setup a web page so that a user cannot select text AND images. I am currently using
onselectstart="return false;"
in the body tag and that works fine for text, but images can still be selected.
This project is not a general purpose/public access website. I am building a kiosk-style system using HTML and Google Chrome as the browser. The system is designed to be interacted with via touch screen. Currently, if the user slightly moves their finger while touching an icon, the browser selects the icon and highlights it in blue. This isn't visually desirable. Is there a way to prevent this without modifying the Google chrome source code. I'm pretty sure I've seen sites that do something like this, but I can't find one right now and I'm just not sure what is the best method.
Thanks
|
|
|
|
|
Also use
ondragstart="return false"
It will solve your problem
|
|
|
|
|
Thanks. That worked perfectly.
|
|
|
|
|
Hi,
I am working with ADFS 2.0.I am creating a sample application on it.I have gathered information about it.
But may be my firewall is blocking it or some ports may not be enable for it.Can anyone tell me what ports need to be enabled for it.I am not sure this is right place to post this.ASAP
Thanks,
Maxy.
|
|
|
|
|
The cursor display with hand as default in the area that html tag defines.I want to change it with others. I tried to do it by using the "style" attribute,but it didn't works.
It is means that the "" doesn't support the cursor style?
|
|
|
|
|
No, the <area> tag doesn’t have a cursor style attribute
|
|
|
|
|
hiiiiiiii
any one can tell me from where i can download free Flash Slideshow Maker trial version for 30 days
Please answer me ASAP
rizvan sivally
|
|
|
|
|
Google[^]
Was not hard to find.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
www.advance2000.net/upload/encode.php
if you look at that site i have a dynamic "table" that is filled out by the user, and i have the function in "onchange" that would change the subtotal values by multiplying the unit price and the quantity. here is the function of addrows of the dynamic table and the function for adding.
my problem is that the function only works for the first row and after that the value of the subtotal that is saved at the database is always 0. can someone help me through this?
function addRow(tbl,row){
row_no++;
if (row_no<=200){
if (row_no>=10){
var textbox = '';}
if (row_no<10){
var textbox = '';}
var textbox2 = '';
var textbox3 = '';
var textbox4 = '';
var textbox5 = '';
var tbl = document.getElementById(tbl);
var rowIndex = document.getElementById(row).value;
var newRow = tbl.insertRow(row_no);
var newCell = newRow.insertCell(0);
newCell.innerHTML = textbox;
var newCell = newRow.insertCell(1);
newCell.innerHTML = textbox2;
var newCell = newRow.insertCell(2);
newCell.innerHTML = textbox3;
var newCell = newRow.insertCell(3);
newCell.innerHTML = textbox4;
var newCell = newRow.insertCell(4);
newCell.innerHTML = textbox5;
}
if (row_no>200){
alert ("Too Many Items. Limit of 200");
}
}
function Sum() {
var q=document.getElementById("quantity[]").value
var x=document.getElementById("desc[]").value
var y=document.getElementById("itemno[]").value
var o=document.getElementById("ourcost[]").value
document.getElementById("ourcost[]").value=x*y
}
|
|
|
|
|
IDs in HTML should be unique, but every row you add has the same IDs in it, "quantity[]", "desc[]", "itemno[]" and "ourcost[]". The Sum function is only finding the first occurrence of each of the IDs and adding them up, though it would need to loop over all the rows in the table calculating the subtotal for each row.
Try using the row number as part of the ID, then you will be able to reference them individually using a for loop.
|
|
|
|