View sourcecode

The following files exists in this folder. Click to view.

movie_reset.php

1 lines UTF-8 Unix (LF)
1
<?php 
/**
 * This is a Anax pagecontroller.
 *
 */
// Include the essential config-file which also creates the $anax variable with its defaults.



// Restore the database to its original settings
$sql      = 'movie.sql';
$mysql    = '/usr/bin/mysql';
$host     = 'blu-ray.student.bth.se';
$login    = 'mos';
$password = "Intentionally removed by CSource";
$output = null;

// Use these settings on windows and WAMPServer, 
// but you must check - and change - your path to the executable mysql.exe
//$mysql    = 'C:\wamp\bin\mysql\mysql5.5.24\bin\mysql.exe';
//$login    = 'root';
//$password = "Intentionally removed by CSource";



  // Use on Unix/Unix/Mac
  $cmd = "$mysql -h{$host} -u{$login} -p{$password = "Intentionally removed by CSource";

  // Use on Windows, remove password if its empty
  //$cmd = "$mysql -h{$host} -u{$login} -p{$password = "Intentionally removed by CSource";
  //$cmd = "$mysql -h{$host} -u{$login} < $sql";

  $res = exec($cmd);
  $output = "<p>Databasen är återställd via kommandot<br/><code>{$cmd}</code></p><p>{$res}</p>";

echo "<output>{$output}</output>";