echo date('h:i A', strtotime($times[$i])); ?> </th> <?php for ($j = 0; $j < $day_count; $j++) { $loaded_day_ID = $j + 1; $start = $times[$i]; $end = $times[$i + 1]; $schedule_id = student_loaded($reg_no, $start, $end, $loaded_day_ID, 1); //1 is current semester //$schedule_id = block_loaded($block_id, $start, $end, $loaded_day_ID,1); //1 is current semester //$schedule_id = block_loaded($block_id, $start, $end, $loaded_day_ID,1); //1 is current semester $loaded_class_id = get_class_id($schedule_id, 1); //to retrieve from actual table if ($loaded_class_id != "") { $slots = get_slots($schedule_id); if (is_first($schedule_id, $start)) { ?> <th bgcolor="#dadada" class="loaded" rowspan="<?php echo $slots; ?> " onclick="show_ticket(<?php echo $schedule_id; ?> )"> <?php $query_subject = mysql_query("SELECT subject_t.subject_title FROM subject_t, class_t \n WHERE subject_t.subject_code=class_t.subject_code\n AND class_t.class_id={$loaded_class_id}") or die(mysql_error()); $row_subject = mysql_fetch_assoc($query_subject); echo "<small>" . $row_subject['subject_title'] . "</small>"; ?> </th><?php }
$mc1->delete_value('ip_history_' . $userid); $mc1->delete_value('u_passkey_' . $passkey); } else { mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE LOW_PRIORITY ips SET lastannounce = " . TIME_NOW . " WHERE ip = " . ann_sqlesc($ip) . " AND userid =" . ann_sqlesc($userid)) or ann_sqlerr(__FILE__, __LINE__); $mc1->delete_value('ip_history_' . $userid); $mc1->delete_value('u_passkey_' . $passkey); } } // End Ip logger $realip = $_SERVER['REMOTE_ADDR']; $torrent = get_torrent_from_hash($info_hash, $userid); if (!$torrent) { err("torrent query error - contact site admin"); } $torrentid = (int) $torrent["id"]; $torrent_modifier = get_slots($torrentid, $userid); $torrent['freeslot'] = $torrent_modifier['freeslot']; $torrent['doubleslot'] = $torrent_modifier['doubleslot']; $happy_multiplier = get_happy($torrentid, $userid); $fields = 'seeder, peer_id, ip, port, uploaded, downloaded, userid, (' . TIME_NOW . ' - last_action) AS announcetime, last_action AS ts, ' . TIME_NOW . ' AS nowts, prev_action AS prevts'; //== Wantseeds - Retro $limit = ''; if ($torrent['numpeers'] > $rsize) { $limit = "ORDER BY RAND() LIMIT {$rsize}"; } // if user is a seeder, then only supply leechers. $wantseeds = ''; if ($seeder == 'yes') { $wantseeds = 'AND seeder = "no"'; } $res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT {$fields} FROM peers WHERE torrent = {$torrentid} {$wantseeds} {$limit}") or ann_sqlerr(__FILE__, __LINE__);
*/ if ($ad_id) { $promo_info = get_ad_info($ad_id, $db); } // Got an image for this ad? Then get its size. We’ll use this // to override anything the database claims the image is. /* if ( $check_these ) { foreach ( $check_these as $key => $val ) { if ( $promo_info[$key.'_image_url'] && is_file('..'.$promo_info[$key.'_image_url'])) { $real_size[$key] = getimagesize('..'.$promo_info[$key.'_image_url']); } } } */ $slot_list = get_slots(null, 'ad', $db); if ($slot_list) { foreach ($slot_list as $key => $val) { $options_list[$key] = $val['min_width'] . '×' . $val['max_width']; } } $alert_output .= $fileops->check_or_make_dir('..' . $image_path); $mobile_form = <<<EOL \t\t<label for="small_image_url">Mobile image</label> \t\t<input type="file" id="small_image_url" name="small_image_url" value=""/> EOL; $mobile_form = <<<EOL \t\t<label for="small_image_url">Mobile image</label> \t\t<input type="file" id="small_image_url" name="small_image_url" value=""/>
$list->content($promo_content); $ad_list_output = '<form accept-charset="UTF-8" action="ad.list.php" method="get">' . "\n"; $ad_list_output .= $list->format_headings(); $ad_list_output .= $list->format_content(); $ad_list_output .= '</form>' . "\n"; } else { $link->url('ad.promo-create.php'); $link->tap('Create one now'); $ad_list_output = $message->info_dialog('Huh. Looks like you haven’t uploaded any ads. ' . $link->paint() . '.'); } $link->url('ad.promo-create.php'); $link->tap('Create an ad'); $ad_list_output .= $link->button_primary('new'); ///////// Display the slots. // Get all slots for this theme. $slot_list = get_slots($current_theme['theme_id'], 'ad', $db); // How many ads are in each slot? if ($slot_list) { foreach ($slot_list as $key => $val) { $ad_slot_match_list = get_ad_slot_matches($key, null, $db); $slot_list[$key]['ad_count'] = count($ad_slot_match_list); } } if ($slot_list) { $heading_list = array(); // reset $heading_list[] = array('value' => 'Name', 'class' => 'nudge'); $heading_list[] = array('value' => 'Size', 'class' => 'nudge'); $heading_list[] = array('value' => 'Assigned ads', 'class' => null); /* $heading_list[] = array(
///////// Display the slots. // Get all slots for this theme. $slot_list = get_slots(1, 'ad', $db); // No slots? Create one. if (!$slot_list) { $data = array(); // reset $data['title'] = 'Slot 1'; $data['label'] = 'default'; $data['theme_id'] = '1'; $data['max_width'] = '101'; $data['max_height'] = '101'; $data['type'] = 'ad'; $new_slot_id = $db->insert('theme_slot', $data); // Get all slots for this theme. $slot_list = get_slots(1, 'ad', $db); } // How many ads are in each slot? if ($slot_list) { foreach ($slot_list as $key => $val) { $ad_slot_match_list = get_ad_slot_matches($key, null, $db); $slot_list[$key]['ad_count'] = count($ad_slot_match_list); } } if ($slot_list) { $heading_list = array(); // reset $heading_list[] = array('value' => 'Name', 'class' => 'nudge'); $heading_list[] = array('value' => 'Assigned ads', 'class' => null); $heading_list[] = array('value' => 'Actions', 'class' => null); $list->headings($heading_list);