echo "<center>"; //_dkg_timezone_set($GLOBALS['time_zone']); //_dkg_connect_mysql($GLOBALS['db_server'],$GLOBALS['db_user'], // $GLOBALS['db_pass']); //_dkg_select_db($GLOBALS['db_name']); _dkg_order_get(); _dkg_index_get(); _dkg_table_set("open"); _dkg_init_pages_go($GLOBALS['index']); _dkg_init_page_selected_go($GLOBALS['path_name'], $GLOBALS['index']); _dkg_table_set("close"); _dkg_init_pages_main(); _dkg_table_set("open"); _dkg_init_pages_go($GLOBALS['index']); _dkg_init_page_selected_go($GLOBALS['path_name'], $GLOBALS['index']); _dkg_table_set("close"); echo "</center>"; ?> </div> <!-- content-wrap ends here --> </div> <!--footer starts here--> <div id="footer"> <p> © <strong><?php echo $GLOBALS['copyright']; ?> </strong> |
function _dkg_init_images_main($path_name, $index) { $query = sprintf("SELECT image_name,thumb_width,\n thumb_height,image_size,image_date,image_type,\n thumb_name,image_width,image_height\n\t\tFROM %s\n\t\tWHERE image_dir\n LIKE '%s' \t", mysql_real_escape_string($GLOBALS['db_table']), mysql_real_escape_string($path_name)); $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $files[] = array("image_name" => "" . $row['image_name'] . "", "thumb_width" => "" . $row['thumb_width'] . "", "thumb_height" => "" . $row['thumb_height'] . "", "image_size" => "" . $row['image_size'] . "", "image_date" => "" . $row['image_date'] . "", "image_type" => "" . $row['image_type'] . "", "thumb_name" => "" . $row['thumb_name'] . "", "image_width" => "" . $row['image_width'] . "", "image_height" => "" . $row['image_height'] . ""); } natsort2d($files); $total_items = mysql_num_rows($result); _dkg_table_set("open"); $table_item = 0; $mark = 0; foreach ($files as $value) { $table_count = 1; while ($table_count <= $total_items) { $open = $table_count * $GLOBALS['thumb_row'] - $GLOBALS['thumb_row']; $close = $table_count * $GLOBALS['thumb_row']; if ($open == $table_item) { $mark++; _dkg_table_row_group_set("open"); } if ($close == $table_item) { _dkg_table_row_group_set("close"); } $table_count++; } $table_item++; _dkg_table_row_group_item_set("open"); echo "<a href='{$GLOBALS['gal_path']}/{$path_name}/{$value['image_name']}' class='lightview' rel='gallery[kindgirls]' title='{$value['image_name']} :: Resolution:" . $value['image_width'] . 'x' . $value['image_height'] . " | Size: " . round($value['image_size'], 2) . "KB | Date: {$value['image_date']} ' ><img src='{$GLOBALS['thumb_path']}/{$value['thumb_name']}' width='360' align=center /></a>"; echo "<p>\n<a href='{$GLOBALS['gal_path']}/{$path_name}/{$value['image_name']}' class='float-left' />" . _dkg_label_processor($value['image_name'], 24) . "</a>\n"; _dkg_table_row_group_item_set("close"); } $marker = $mark * $GLOBALS['thumb_row'] - $total_items; while ($marker > 0) { _dkg_table_row_group_item_set("open"); _dkg_table_row_group_item_set("close"); $marker--; } _dkg_table_set("close"); }