Exemple #1
0
function nyxIn_SubgalleryDumper($gallery_id, $init)
{
    global $nyxIn;
    global $nyxIn_Var_SubgalleryDumper;
    if ($init == 1) {
        $nyxIn_Var_SubgalleryDumper = "";
    }
    $nyxIn_Query_SelectGalleryMetadata = $nyxIn['db']->query("SELECT id, parent_id, name FROM " . $nyxIn['db_prefix'] . "galleries WHERE id=" . $gallery_id) or die($nyxIn['db']->error);
    if ($nyxIn_Query_SelectGalleryMetadata->num_rows == 0) {
        if ($gallery_id == 0) {
            $nyxIn_Var_SubgalleryDumper[] = "<span class='ajaxed' onClick='nyxIn_Ajax_Views(\"g\", 0, \"\")'>" . "Home" . "</span>";
        }
        $nyxIn_Var_SubgalleryDumper = array_reverse($nyxIn_Var_SubgalleryDumper);
        $nyxIn_Var_SubgalleryDumperImploded = implode($nyxIn_Var_SubgalleryDumper, " &#x2756; ");
        echo "<p>" . $nyxIn_Var_SubgalleryDumperImploded . "</p>";
    } else {
        while ($row = $nyxIn_Query_SelectGalleryMetadata->fetch_object()) {
            $nyxIn_Var_SubgalleryDumper[] = $row->name;
            nyxIn_SubgalleryDumper($row->parent_id, 0);
        }
    }
}
Exemple #2
0
    $cols = 0;
    echo "<table width='100%'>";
    echo "<tr>";
    while ($row = $nyxQuery_SelectClassMetadata->fetch_object()) {
        $filename = $row->safename . "_thumb." . $row->fileextension;
        echo "<td width='50%' valign='top' class='moderate_image moderate_image_" . $row->id . "'>";
        ?>
							<img src='uploads/<?php 
        echo $filename;
        ?>
' width='100%' style='margin-bottom:5px;' onClick="toggleApproveReject(<?php 
        echo $row->id;
        ?>
)">
							<?php 
        nyxIn_SubgalleryDumper($row->gallery_id, 1);
        echo "</div>";
        echo "<input type='hidden' class='moderate_image_" . $row->id . "' name='moderate_image[" . $row->id . "]' value='0'>";
        echo "</td>";
        $cols++;
        if ($cols % 2 == 0) {
            echo "</tr><tr>";
        }
    }
    echo str_repeat("<td width='50%' valign='top'></td>", 2 - ($cols + 2) % 2);
    echo "</tr>";
    echo "</table>";
    ?>
			<input type="submit" value="Moderate">
		</form>
	</div>