Example #1
0
    echo ". ";
    if ($ext) {
        if (!is_readable("{$photos_dir}/{$lid}.{$ext}")) {
            printf("<br />" . _MD_A_GNAVI_FMT_PHOTONOTREADABLE . "\n", "{$photos_dir}/{$lid}.{$ext}");
            $dead_photos++;
        }
        if ($gnavi_makethumb && in_array(strtolower($ext), $gnavi_normal_exts) && !is_readable("{$thumbs_dir}/{$lid}.{$ext}")) {
            printf("<br />" . _MD_A_GNAVI_FMT_THUMBNOTREADABLE . "\n", "{$thumbs_dir}/{$lid}.{$ext}");
            $dead_thumbs++;
        }
    }
}
// show result
if ($dead_photos == 0) {
    if (!$gnavi_makethumb || $dead_thumbs == 0) {
        echo "<font color='#00FF00'><b>ok</b></font> &nbsp; <br />\n";
    } else {
        printf("<br /><font color='#FF0000'><b>" . _MD_A_GNAVI_FMT_NUMBEROFDEADTHUMBS . "</b></font><br />\n", $dead_thumbs);
        echo "\n\t\t\t<form action='index.php?page=redothumbs' method='post'>\n\t\t\t\t<input type='submit' value='" . _MD_A_GNAVI_LINK_REDOTHUMBS . "' />\n\t\t\t</form>\n";
    }
} else {
    printf("<br /><font color='#FF0000'><b>" . _MD_A_GNAVI_FMT_NUMBEROFDEADPHOTOS . "</b></font><br />\n", $dead_photos);
    echo "\n\t\t<form action='index.php?page=redothumbs' method='post'>\n\t\t\t<input type='hidden' name='removerec' value='1' />\n\t\t\t<input type='submit' value='" . _MD_A_GNAVI_LINK_TABLEMAINTENANCE . "' />\n\t\t</form>\n";
}
// Clear tempolary files
$removed_tmp_num = gnavi_clear_tmp_files($photos_dir);
if ($removed_tmp_num > 0) {
    printf("<br />" . _MD_A_GNAVI_FMT_NUMBEROFREMOVEDTMPS . "<br />\n", $removed_tmp_num);
}
gnavi_closetable();
xoops_cp_footer();
Example #2
0
        if ($dim) {
            $resx1 = $dim[0];
            $resy1 = $dim[1];
        }
    }
    if ($ext2 && in_array(strtolower($ext2), $gnavi_normal_exts)) {
        $dim = GetImageSize($photos_dir . "/" . $lid . "_2." . $ext2);
        if ($dim) {
            $resx2 = $dim[0];
            $resy2 = $dim[1];
        }
    }
    gnavi_update_desc($mode, $lid, $cid, $title, $submitter, $valid, $ext, $ext1, $ext2, $resx, $resy, $resx1, $resy1, $resx2, $resy2, $caption, $caption1, $caption2, $desc_text, $arrow_html, $addinfo);
    $redirect_uri = "index.php?lid={$lid}";
    if ($mode == G_INSERT) {
        gnavi_clear_tmp_files($photos_dir);
        redirect_header($redirect_uri, 2, _MD_GNAV_MSG_RECEIVED);
    } else {
        redirect_header($redirect_uri, 2, _MD_GNAV_MSG_DBUPDATED);
    }
    exit;
}
// Confirm Delete
if (!empty($_POST['conf_delete'])) {
    if (!($global_perms & GNAV_GPERM_DELETABLE)) {
        redirect_header($mod_url . '/', 3, _NOPERM);
        exit;
    }
    include XOOPS_ROOT_PATH . "/include/cp_functions.php";
    include XOOPS_ROOT_PATH . "/header.php";
    echo "<h2>" . _MD_GNAV_SMT_DELETE . "</h2><hr />";