Exemple #1
0
                        if ($aliasUpdate->execute() > 0) {
                            //echo "Alias updated Successfully.";
                        }
                    }
                } else {
                    echo "Alias '" . $fileAlias . "' already exists!";
                    $fileUpdate->setAliasID($file->getAliasID());
                }
            }
        }
        //pa( $fileUpdate );
        $fileUpdate->setConnection($conn);
        $fileUpdate->setId($fileID);
        if ($fileUpdate->save() > 0) {
            //echo "Saved." ;
            $changes = $fileUpdate->compareTo($file);
            echo "Modifications: <ul>";
            foreach ($changes as $k => $v) {
                if ($v != "un-modified") {
                    echo '<li>' . $k . '</li>';
                }
            }
            echo '</ul>';
            echo '<a href="/admin">Home</a>';
        }
    } else {
        echo "Invalid Security Code!";
        echo '<a href="/admin">Home</a>';
    }
} else {
    ?>