diff --git a/index.php b/index.php index 6534322..4719316 100755 --- a/index.php +++ b/index.php @@ -60,7 +60,10 @@ copy: function() { return $('#password').val() }, - afterCopy: function() {} + afterCopy: function() { + $.post('update.php', { site: $('#root').val() }, + function(data) {}); + } }); }); diff --git a/sites.sql b/sites.sql new file mode 100755 index 0000000..242994b --- /dev/null +++ b/sites.sql @@ -0,0 +1,39 @@ +-- phpMyAdmin SQL Dump +-- version 3.4.5 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: Dec 06, 2011 at 08:33 PM +-- Server version: 5.5.16 +-- PHP Version: 5.3.8 + +SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +-- +-- Database: `temp` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pg_sites` +-- + +CREATE TABLE IF NOT EXISTS `pg_sites` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `site` varchar(255) NOT NULL, + `max` int(11) NOT NULL, + `special` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/update.php b/update.php new file mode 100755 index 0000000..863b890 --- /dev/null +++ b/update.php @@ -0,0 +1,11 @@ +prepare("INSERT IGNORE INTO pg_sites (site) VALUES(?)"); + $query->bind_param('s', $site); + $query->execute(); + $query->close(); +?> +{} \ No newline at end of file