forked from science-ation/science-ation
Merge branch 'science-ation' of https://forge.science-ation.ca/arman/science-ation into science-ation_tours
This commit is contained in:
commit
e3727aaaeb
@ -81,8 +81,8 @@ switch ($_GET['action']) {
|
|||||||
*/
|
*/
|
||||||
$q .= ",name=" . $pdo->quote($_POST['name']) . ",
|
$q .= ",name=" . $pdo->quote($_POST['name']) . ",
|
||||||
criteria='" . iconv('UTF-8', 'ISO-8859-1', stripslashes($_POST['criteria'])) . "'";
|
criteria='" . iconv('UTF-8', 'ISO-8859-1', stripslashes($_POST['criteria'])) . "'";
|
||||||
if (intval($_POST['sponsors_id']) != -1) {
|
if (isset($_POST['sponsors_id']) || $_POST['sponsors_id'] != '' || intval($_POST['sponsors_id']) != -1) {
|
||||||
$q .= "sponsors_id='" . $sponsors_id . "' ";
|
$q .= ", sponsors_id=" . intval($_POST['sponsors_id']) . " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +96,6 @@ switch ($_GET['action']) {
|
|||||||
} catch (PDOException $exception) {
|
} catch (PDOException $exception) {
|
||||||
error_('Award not created');
|
error_('Award not created');
|
||||||
error_('Award information failed to save');
|
error_('Award information failed to save');
|
||||||
error_log("Here");
|
|
||||||
error_log($exception);
|
error_log($exception);
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
@ -579,7 +578,7 @@ function update_prizeinfo()
|
|||||||
"<td style=\"cursor:pointer; width:4em; text-align:right; padding-left:2em; padding-right:2em;\" "+oc+">"+p.scholarship+"</td>"+
|
"<td style=\"cursor:pointer; width:4em; text-align:right; padding-left:2em; padding-right:2em;\" "+oc+">"+p.scholarship+"</td>"+
|
||||||
"<td style=\"cursor:pointer; width:4em; text-align:right; padding-left:2em; padding-right:2em;\" "+oc+">"+p.value+"</td>"+
|
"<td style=\"cursor:pointer; width:4em; text-align:right; padding-left:2em; padding-right:2em;\" "+oc+">"+p.value+"</td>"+
|
||||||
"<td style=\"text-align:center;\">"+
|
"<td style=\"text-align:center;\">"+
|
||||||
" <a onclick=\"edit_prize("+p.id+");\" href=\"#\"><img border=\"0\" src=\"<?= $config['SFIABDIRECTORY'] ?>/images/16/edit.<?= $config['icon_extension'] ?>\"></a> "+
|
"<a onclick=\"edit_prize("+p.id+");\" href=\"#\"><img border=\"0\" src=\"<?= $config['SFIABDIRECTORY'] ?>/images/16/edit.<?= $config['icon_extension'] ?>\"></a> "+
|
||||||
"<a onclick=\"prize_delete("+p.id+");\" href=\"#\" ><img border=0 src=\"<?= $config['SFIABDIRECTORY'] ?>/images/16/button_cancel.<?= $config['icon_extension'] ?>\"></a>"+
|
"<a onclick=\"prize_delete("+p.id+");\" href=\"#\" ><img border=0 src=\"<?= $config['SFIABDIRECTORY'] ?>/images/16/button_cancel.<?= $config['icon_extension'] ?>\"></a>"+
|
||||||
"</td></tr>");
|
"</td></tr>");
|
||||||
}
|
}
|
||||||
@ -627,6 +626,7 @@ function prize_save()
|
|||||||
|
|
||||||
function prize_delete(id)
|
function prize_delete(id)
|
||||||
{
|
{
|
||||||
|
console.log("hi" + id);
|
||||||
var confirm = confirmClick('Are you sure you want to delete this prize?');
|
var confirm = confirmClick('Are you sure you want to delete this prize?');
|
||||||
if(confirm == true) {
|
if(confirm == true) {
|
||||||
$("#prizeinfo_info").load("<? $_SERVER['PHP_SELF'] ?>?action=prize_delete&id="+id,null,
|
$("#prizeinfo_info").load("<? $_SERVER['PHP_SELF'] ?>?action=prize_delete&id="+id,null,
|
||||||
@ -908,7 +908,7 @@ while ($dr = $dq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
<br />
|
<br />
|
||||||
<form>
|
<form>
|
||||||
<input type="submit" onClick="prize_create();return false;" value="<?= i18n('Create New Prize') ?>" />
|
<input type="submit" onClick="prize_create();return false;" value="<?= i18n('Create New Prize') ?>" />
|
||||||
<input type="submit" id="prizeinfo_save" onClick="prize_save();" value="<?= i18n('Save Prize') ?>" disabled="disabled" />
|
<input type="submit" id="prizeinfo_save" onClick="prize_save();return false;" value="<?= i18n('Save Prize') ?>" disabled="disabled" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -110,6 +110,7 @@ if ($_POST['action'] == 'save') {
|
|||||||
if (!$readonly) {
|
if (!$readonly) {
|
||||||
$splist = array();
|
$splist = array();
|
||||||
$noawards = false;
|
$noawards = false;
|
||||||
|
|
||||||
if (is_array($_POST['spaward']))
|
if (is_array($_POST['spaward']))
|
||||||
$splist = $_POST['spaward'];
|
$splist = $_POST['spaward'];
|
||||||
|
|
||||||
@ -131,7 +132,7 @@ if ($_POST['action'] == 'save') {
|
|||||||
?,
|
?,
|
||||||
?,
|
?,
|
||||||
?)');
|
?)');
|
||||||
$stmt->execute([$s, $project->id, $config['FAIRYEAR']]);
|
$stmt->execute([$spaward, $project->id, $config['FAIRYEAR']]);
|
||||||
show_pdo_errors_if_any($pdo);
|
show_pdo_errors_if_any($pdo);
|
||||||
}
|
}
|
||||||
if ($num) {
|
if ($num) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user