$change_made = true; } } } if ($change_made == true) { $link->title = 'Go back to the screen with all your site’s ads.'; $link->url = 'ad.list.php'; $link->tap = 'Return to the ad list'; $alert_output = $message->success_dialog('Ads reassigned. ' . $link->paint()); } /***** * Display logic */ if ($slot_id) { // Get basic information about this slot. $slot_info = get_slot_info($slot_id, $db); // What ads are in this slot? $match_list = get_ad_slot_matches($slot_id, null, $db); } // What ads might fit into this slot? if ($slot_info) { // $possible_ad_list = $db->where('large_width', $slot_info['max_width'],'<=') // ->where('large_height', $slot_info['max_height'],'<=') $possible_ad_list = $db->get('ad_reference', null, 'id,title,source_id,source_rel_id,large_width,large_height,large_image_url,code'); if ($possible_ad_list) { $possible_ad_list = rekey_array($possible_ad_list, 'id'); } } if ($possible_ad_list) { $image = new GrlxImage(); $image->style = 'max-height:100px;max-width:468px';
function edit_slot() { global $nodeinfo, $HTTP_POST_VARS, $field_image_file, $field_image_file_name, $sess; if (!defined("RED_NOTIFICATION_INC")) { } include "messages/red_notification.inc"; $slot = validate_and_set($HTTP_POST_VARS); $oldslot = get_slot_info($slot['id']); edit_slot_ex($slot['id'], $slot); if (isset($HTTP_POST_VARS['row']) and $HTTP_POST_VARS['row'] != "") { reposition_slot($slot, $HTTP_POST_VARS['row']); } copy_file($slot['id']); //Notify users only if god (admin) wants them to be notified (the default) if (isset($HTTP_POST_VARS['field_notify_users']) and $slot['islive'] == "y") { $trail1_new = get_node_info($slot['trail_1_id']); $trail2_new = $slot['trail_2_id'] ? get_node_info($slot['trail_2_id']) : -1; $trail1_old = get_node_info($oldslot['trail_1_id']); $trail2_old = $oldslot['trail_2_id'] ? get_node_info($oldslot['trail_2_id']) : -1; send_red_notification(LTMSG_SLOTTERM, $trail1_old['userid'], $trail1_old['id'], $slot['node']); if ($trail2 != -1) { send_red_notification(LTMSG_SLOTTERM, $trail2_old['userid'], $trail2_old['id'], $slot['node']); } send_red_notification(LTMSG_SLOTTERM, $trail1_new['userid'], $trail1_new['id'], $slot['node']); if ($trail2 != -1) { send_red_notification(LTMSG_SLOTTERM, $trail2_new['userid'], $trail2_new['id'], $slot['node']); } } Header("Location: " . $sess->url($nodeinfo['path'])); exit; }