coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 ecards & email => Topic started by: rybosom on May 25, 2008, 12:48:21 AM

Title: what's wrong with db_ecard.php ??
Post by: rybosom on May 25, 2008, 12:48:21 AM
I can't delete e-cards from table :o
please to confirm is it correct source:
<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

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

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?
Title: Re: what's wrong with db_ecard.php ??
Post by: rybosom on May 25, 2008, 12:53:28 AM
maybe something wrong with:
   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.