Beispiel #1
0
        echo _EDIT_CONFIRM_DELETE;
        ?>
</a></b>
		</div>
		<div class="sep">
			<?php 
        printf(_EDIT_CANCEL_DELETE, "<a href=\"" . url("view/" . $objid) . "\">", "</a>");
        ?>
		</div>
		<?php 
        break;
    case "delete2":
        if (!$extraRights && $_auth["useid"] != $objData["objCreator"]) {
            notice(_ACCESS_DENIED);
            echo '</div>';
            return;
        }
        sql_query("UPDATE {$_objects} SET `objDeleted` = '1' WHERE `objid` = '{$objid}'");
        sql_query("UPDATE {$_objExtData} SET `objDeletedBy` = '" . $_auth["useid"] . "', `objDeleteDate` = NOW() WHERE `objEid` = '{$objid}'");
        include_once INCLUDES . "submission.php";
        updateObjCount($objData["objCreator"]);
        echo "<div>" . _EDIT_DELETED . "</div>";
        break;
    default:
        redirect(url("view/" . $objid));
}
if ($part != "keywords") {
    ?>
	</div>
	<?php 
}
Beispiel #2
0
function abuseRestore($objid, $useid, $abuid)
{
    global $_objects, $_objExtData, $isExtras;
    sql_query("UPDATE {$_objects} SET `objDeleted` = '0', `objPending` = '0', `objPendingUser`='0'" . "WHERE `objid` = '{$objid}' LIMIT 1");
    sql_query("UPDATE {$_objExtData} SET `objNoAbuse` = '1' " . "WHERE `objEid` = '{$objid}' LIMIT 1");
    // Send the message to the artist that their work has been restored.
    addUpdate(updTypeMessageRestored, $useid, $objid, $isExtras);
    // Put this submission back to users updates.
    if ($isExtras) {
        $result = sql_query("SELECT DISTINCT `useid` FROM `updates`,`users` " . "WHERE `useid` = `updCreator` AND `updObj` = '{$objid}' " . "AND `updType` = '" . updTypeArtExtra . "'");
        while ($rowData = mysql_fetch_assoc($result)) {
            //	recountUpdates( updTypeArtExtra, $rowData[ "useid" ]);
            sql_query("UPDATE `useExtData` SET `useUpdExt` = `useUpdExt` + 1 " . "WHERE `useEid` = '" . intval($rowData["useid"]) . "' LIMIT 1");
        }
    } else {
        $result = sql_query("SELECT DISTINCT `useid` FROM `updatesArt`,`users` " . "WHERE `useid` = `updCreator` AND `updObj` = '{$objid}'");
        while ($rowData = mysql_fetch_assoc($result)) {
            //	recountUpdates( updTypeArt, $rowData[ "useid" ]);
            sql_query("UPDATE `useExtData` SET `useUpdObj` = `useUpdObj` + 1 " . "WHERE `useEid` = '" . intval($rowData["useid"]) . "' LIMIT 1");
        }
    }
    // Update object count.
    include_once INCLUDES . "submission.php";
    updateObjCount($useid);
    // Set the abuse case to the "resolved" state.
    sql_query("UPDATE `abuses` SET `abuResolved` = '1', `abuFinal`='+', `abuCloseDate`=NOW() " . "WHERE `abuid` = '{$abuid}' LIMIT 1");
}
Beispiel #3
0
function submitModifiedTitle($objid, $title, $comment, $mature, $forClub, $folder = 0, $collab = 0, $gift = 0, $forClub2 = 0, $forClub3 = 0)
{
    $oldCollab = 0;
    $collabConfirmed = 0;
    $objCreator = 0;
    $sql = "SELECT `objCollab`, `objCollabConfirmed`, `objCreator` " . "FROM `objects`, `objExtData`" . dbWhere(array("objid*" => "objEid", "objid" => $objid));
    $objResult = sql_query($sql);
    if ($objData = mysql_fetch_assoc($objResult)) {
        $oldCollab = $objData["objCollab"];
        $collabConfirmed = $objData["objCollabConfirmed"];
        $objCreator = $objData["objCreator"];
    }
    mysql_free_result($objResult);
    if ($forClub2 == $forClub) {
        $forClub2 = 0;
    }
    if ($forClub3 == $forClub || $forClub3 == $forClub2) {
        $forClub3 = 0;
    }
    sql_where(array("cloObject" => $objid));
    sql_delete("clubObjects");
    if ($forClub > 0) {
        sql_values(array("cloObject" => $objid, "cloClub" => $forClub));
        sql_insert("clubObjects");
    }
    if ($forClub2 > 0) {
        sql_values(array("cloObject" => $objid, "cloClub" => $forClub2));
        sql_insert("clubObjects");
    }
    if ($forClub3 > 0) {
        sql_values(array("cloObject" => $objid, "cloClub" => $forClub3));
        sql_insert("clubObjects");
    }
    $values = array("objTitle" => $title, "objMature" => $mature, "objForClub" => $forClub, "objForClub2" => $forClub2, "objForClub3" => $forClub3, "objFolder" => $folder);
    if (!$collabConfirmed || atLeastSModerator()) {
        $values["objCollab"] = $collab;
    }
    $values["objForUser"] = $gift;
    $sql = "UPDATE `objects`" . dbSet($values) . dbWhere(array("objid" => $objid));
    sql_query($sql);
    $values = array("objComment" => $comment);
    if ($collab == 0 && atLeastSModerator()) {
        $values["objCollabConfirmed"] = 0;
    }
    $sql = "UPDATE `objExtData`" . dbSet($values) . dbWhere(array("objEid" => $objid));
    sql_query($sql);
    updateSearchCache($objid);
    updateObjCount($objCreator);
    updateObjCount($collab);
    if ($collab != $oldCollab) {
        updateObjCount($oldCollab);
    }
}
Beispiel #4
0
                                             sql_query("UPDATE `objExtData` " . "SET {$oekakiExtras} " . "WHERE `objEid` = '{$objid}' LIMIT 1");
                                         }
                                         // Notify the watchers.
                                         addArtUpdateToWatchers($_auth["useid"], $objid, $forClub);
                                         addArtUpdateToWatchers($_auth["useid"], $objid, $forClub2);
                                         addArtUpdateToWatchers($_auth["useid"], $objid, $forClub3);
                                         removeDupeArtUpdates($objid);
                                         // Clean up the objects table - remove
                                         // submissions that failed uploading.
                                         $result = sql_query("SELECT `objid` " . "FROM `objects`, `objExtData` " . "WHERE `objid` = `objEid` " . "AND `objExtension` = '' " . "AND `objDeleted` = '1'");
                                         while ($delData = mysql_fetch_assoc($result)) {
                                             sql_query("DELETE FROM `objects` " . "WHERE `objid` = '" . $delData["objid"] . "'");
                                             sql_query("DELETE FROM `objExtData` " . "WHERE `objEid` = '" . $delData["objid"] . "'");
                                         }
                                         include_once INCLUDES . "submission.php";
                                         updateObjCount($_auth["useid"]);
                                         // Redirect the user to the newly submitted artwork...
                                         redirect(url("view/" . $objid));
                                     }
                                     if (!$uploadError && $uploadErrorThumb) {
                                         $uploadError = _SUBMIT_THUMBNAIL_ERROR;
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }