Store the root domain in remotely so we can keep track of any specific rules.

This commit is contained in:
Andrew Tomaka 2011-12-06 14:34:16 -05:00
parent ae667ab263
commit 6bc559208f
3 changed files with 54 additions and 1 deletions

View file

@ -60,7 +60,10 @@
copy: function() { copy: function() {
return $('#password').val() return $('#password').val()
}, },
afterCopy: function() {} afterCopy: function() {
$.post('update.php', { site: $('#root').val() },
function(data) {});
}
}); });
}); });
</script> </script>

39
sites.sql Executable file
View file

@ -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 */;

11
update.php Executable file
View file

@ -0,0 +1,11 @@
<?php
$site = $_POST['site'];
$db = new mysqli('localhost', 'root', '', 'temp');
$query = $db->prepare("INSERT IGNORE INTO pg_sites (site) VALUES(?)");
$query->bind_param('s', $site);
$query->execute();
$query->close();
?>
{}