Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: what's wrong with db_ecard.php ??  (Read 6240 times)

0 Members and 1 Guest are viewing this topic.

rybosom

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 25
what's wrong with db_ecard.php ??
« on: May 25, 2008, 12:48:21 am »

I can't delete e-cards from table :o
please to confirm is it correct source:
Code: [Select]
<script language="javascript" type="text/javascript">
<!--
function checkAll(field) {
for (i = 0; i < field.length; i++)
  field[i].checked = true;
}

function uncheckAll(field) {
for (i = 0; i < field.length; i++)
  field[i].checked = false;
}

var checkobj

function agreesubmit(el) {
checkobj=el
if (document.all||document.getElementById) {
for (i=0;i<checkobj.form.length;i++) {  //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}

function defaultagree(el) {
if (!document.all&&!document.getElementById) {
if (window.checkobj&&checkobj.checked)
return true
else {
alert("<?php print $lang_db_ecard_php['ecards_delete_confirm']; ?>")
return false
}
}
}

-->
</script>
and
Code: [Select]
print '<input type="button" name="CheckAll" class="button" value="'.$lang_db_ecard_php['check_all'].'" onClick="checkAll(document.ecardselect.eidselector)" />&nbsp;';
print '<input type="button" name="UnCheckAll" class="button" value="'.$lang_db_ecard_php['uncheck_all'].'" onClick="uncheckAll(document.ecardselect.eidselector)" />';
and
Code: [Select]
print '<input type="submit" class="button" name="delete" value="'.$lang_db_ecard_php['ecards_delete_selected'].'" disabled />&nbsp;';
print '<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)" />'.$lang_db_ecard_php['ecards_delete_sure'];
don't work, why?
Logged

rybosom

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 25
Re: what's wrong with db_ecard.php ??
« Reply #1 on: May 25, 2008, 12:53:28 am »

maybe something wrong with:
Code: [Select]
   print "<td".$tempClass." align=\"center\"><input type=\"Checkbox\" name=\"eid[]\" value=\"".$line['eid']."\" id=\"eidselector\" class=\"checkbox\" /></td>\n";
couse name=\"eid[]\" is blank string.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.