예제 #1
0
                     $aliasUpdate->bindParam(':NEWALIAS', $fileAlias);
                     $aliasUpdate->bindParam(':ALIASID', $file->getAliasID());
                     $fileUpdate->setAliasID($file->getAliasID());
                     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>';