
corbeeresearch
Members-
Posts
70 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
corbeeresearch's Achievements

Member (2/5)
0
Reputation
-
sidebars and content not fitting together
corbeeresearch replied to corbeeresearch's topic in CSS Help
Nevermind it's now working -
Hi, I'm trying to theme dynamically, but I can't seem to get to fit the sidebars and content to be aligned with each other. What am I doing wrong? here is my code. css #content-wrapper{ width: 922; background-color: #FFFFFF; } /* Content */ #content { /*float: left; color: #333; font-size: 14px; background: #FFF; margin: 0px 0px 0px 0px; padding: 10px; height: auto; width: auto; */ display:inline; float:left; position:relative; text-align:left; } /* sidebar */ #leftcolumn{ /* color: #333; margin: 0px 0px 0px 0px; padding: 10px; height: auto; width: 150px; font-size:11px; */ float: left; border-right: 1px solid #000; background: #FFF; display:inline; position:relative; } #rightcolumn { /* color: #333; margin: 0px 0px 0px 0px; padding: 10px; height: auto; width: 150px; font-size:11px; */ float: left; border-left: 1px solid #000; background: #FFF; display:inline; position:relative; } html <div id="content-wrapper"> <?php if ($page['sidebar_first']): ?> <div id="leftcolumn"><div class="section"> <?php print render($page['sidebar_first']); ?> </div></div> <?php endif; ?> <div id="content" class="column"><div class="section"> <?php if ($breadcrumb): ?> <div id="breadcrumb"><?php print $breadcrumb; ?></div> <?php endif; ?> <?php print render($title_prefix); ?> <?php if ($title): ?> <h1 class="title" id="page-title"> <?php print $title; ?> </h1> <?php endif; ?> <?php print render($title_suffix); ?> <?php if ($tabs): ?> <div class="tabs"> <?php print render($tabs); ?> </div> <?php endif; ?> <?php if ($action_links): ?> <ul class="action-links"> <?php print render($action_links); ?> </ul> <?php endif; ?> <?php print render($page['content']); ?> <?php print $feed_icons; ?> </div></div> <?php if ($page['sidebar_second']): ?> <div id="rightcolumn"><div class="section"> ?php print render($page['sidebar_second']); ?> </div></div> <?php endif; ?> <span> </span><br/> </div>
-
Hi, After successfully creating a cron job that runs a php script to update the database. I thought everything was okay until I saw that outside public_html there are LOTS of duplicates of cron.php.n Where n are numbers. I suspect cron jobs are causing these. Does anyone knows why this is happening? and Is there something I could do to stop the system from generating something like this? I also a lot of dbn.sdb I'm not sure if this is related too.
-
Nevermind, I did it again from scratch and it appears to work
-
Hi This part of code `FK_user_project` FOREIGN KEY (`user_id`) REFERENCES `tbl_user` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT; Won't work in the following code. CREATE TABLE IF NOT EXISTS `tbl_issue` ( `id` INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, `name` varchar(256) NOT NULL, `description` varchar(2000), `project_id` INTEGER, `type_id` INTEGER, `status_id` INTEGER, `owner_id` INTEGER, `requester_id` INTEGER, `create_time` DATETIME, `create_user_id` INTEGER, `update_time` DATETIME, `update_user_id` INTEGER ) ENGINE = InnoDB ; CREATE TABLE IF NOT EXISTS `tbl_user` ( `id` INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, `email` Varchar(256) NOT NULL, `username` Varchar(256), `password` Varchar(256), `last_login_time` Datetime, `create_time` DATETIME, `create_user_id` INTEGER, `update_time` DATETIME, `update_user_id` INTEGER ) ENGINE = InnoDB ; CREATE TABLE IF NOT EXISTS `tbl_project_user_assignment` ( `project_id` Int(11) NOT NULL, `user_id` Int(11) NOT NULL, `create_time` DATETIME, `create_user_id` INTEGER, `update_time` DATETIME, `update_user_id` INTEGER, PRIMARY KEY (`project_id`,`user_id`) ) ENGINE = InnoDB ; -- The Relationships ALTER TABLE `tbl_issue` ADD CONSTRAINT `FK_issue_project` FOREIGN KEY (`project_id`) REFERENCES `tbl_project` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT; ALTER TABLE `tbl_issue` ADD CONSTRAINT `FK_issue_owner` FOREIGN KEY (`owner_id`) REFERENCES `tbl_user` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT; ALTER TABLE `tbl_issue` ADD CONSTRAINT `FK_issue_requester` FOREIGN KEY (`requester_id`) REFERENCES `tbl_user` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT; ALTER TABLE `tbl_project_user_assignment` ADD CONSTRAINT `FK_project_user` FOREIGN KEY (`project_id`) REFERENCES `tbl_project` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT; ALTER TABLE `tbl_project_user_assignment` ADD CONSTRAINT `FK_user_project` FOREIGN KEY (`user_id`) REFERENCES `tbl_user` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT; -- Insert some seed data so we can just begin using the database INSERT INTO `tbl_user` (`email`, `username`, `password`) VALUES ('[email protected]','Test_User_One', MD5('test1')), ('[email protected]','Test_User_Two', MD5('test2')) ; Where did I go wrong? Thanks
-
Selecting a VPS for PHP
corbeeresearch replied to corbeeresearch's topic in PHP Installation and Configuration
Actually two type of website first site is largely pure article information plus voting, contact form, flash movie, download of mp3's. The login is strictly for administrative purpose. expected numbers of visitors per day would be 15,000. 2nd site is a private social networking with something like project planning, journals, forums, and some sort of complicated journal that connects all other journals like a wiki. users would probably less than a hundred. In addition to this, if it at a distant future the first site reached millions of visits and the second site thousands of users, how large should I increase the ram and process power? -
Hi, if ever I'm planning to build a typical web 2.0 php website. How much RAM should I choose and how many processing power do I need? Thanks
-
php.ini in public_html
corbeeresearch replied to corbeeresearch's topic in PHP Installation and Configuration
Thanks, it works like magic! -
Hi, It's my first time encountering a php.ini in a public_html folder. and the problem is that when you do a www.example.com/php.ini you will see the configuration. Is this safe? how do you make it safe? Thanks
-
Nevermind, I realized that I'm overwriting the loop. Thanks for everyones time.
-
First of all, I'm not used to using database without codeigniter, though it is working fine, I kept receiving a warning message. Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in XXXXXXX on line 69 result: 6Error, message already sent What am I doing wrong to prompt this warning? this is my code <?php include('config.php'); $nineyesterday =date( 'Y-m-d H:i:s', mktime(date("H") - (date("H") + 3), date("i") - date("i"), date("s") - date("s"), date("m") , date("d"), date("Y")) ); $ny10pm =date( 'Y-m-d H:i:s', mktime(date("H") - (date("H") + 3), date("i") - date("i") + 10, date("s") - date("s"), date("m") , date("d"), date("Y")) ); $now = date('Y-m-d H:i:s'); $nineam = date('Y-m-d 09:00:00'); $ninepm = date('Y-m-d 21:00:00'); $nine10am = date('Y-m-d 09:10:00'); $nine10pm = date('Y-m-d 21:10:00'); echo '9pm yesterday: '.$nineyesterday; echo '<br/>'; echo '9am: '.$nineam; echo '<br/>'; echo '9pm: '.$ninepm; echo '<br/>'; echo 'now: '.$now; echo '<br/>'; /** * If statement inside if statement, check if record exists in the database, * if not available, insert and send email * if exists do nothing. * * */ if ((strtotime($now) > strtotime($ny10pm)) && (strtotime($now) <= strtotime($nine10am))) { //count the answers by yes or no echo 'yesterday at 9pm till today at 9am '.'<br/>'; //query the date if doesn't exist insert the date and do the query $date = "SELECT count(date) FROM t_date WHERE date = '".$nineam."'"; $istrue = mysql_query($date); while($row = mysql_fetch_array($istrue)) { $istrue = $row['count(date)']; } echo "result: ".$istrue; if ($istrue == 0) { $q = "SELECT opt, count(opt) FROM plus_poll_ans WHERE date BETWEEN '".$nineyesterday."' AND '".$nineam."' GROUP BY opt desc "; $subject = "Confessions from ".$nineyesterday." to ".$nineam; $flagdate = mysql_query("INSERT INTO t_date(date) values('".$nineam."')"); echo "<br/> successful <br/>"; } else { exit('Error, message already sent'); } // else exits } elseif ((strtotime($now) > strtotime($nine10am)) && (strtotime($now) <= strtotime($nine10pm))) { //count the answers by yes or no echo 'today at 9am to 9pm'.'<br/>'; //query the date if doesn't exist insert the date and do the query $date = "SELECT count(date) FROM t_date WHERE date = '".$ninepm."'"; $istrue = mysql_query($date); while($row = mysql_fetch_array($istrue)) { $istrue = $row['count(date)']; } echo "result: ".$istrue; if ($istrue == 0) { $q = "SELECT opt, count(opt) FROM plus_poll_ans WHERE date BETWEEN '".$nineam."' AND '".$ninepm."' GROUP BY opt desc "; $subject = "Confessions from ".$nineam." to ".$ninepm; $flagdate = mysql_query("INSERT INTO t_date(date) values('".$ninepm."')"); echo "<br/> successful <br/>"; } else { exit('Error, message already sent'); } exit; } Thanks in advance
-
Nevermind, that's because it's today after 9pm.
-
Hi, I'm preparing a code for an automated email, but the date time is not working correctly. I wanted to do a cron scheduler that emails people twice a day - 9am and 9pm. 9am sends email about records logged starting 9pm yesterday to 9am, while 9pm sends email about records logged from 9:01am to 9:00pm. The database uses date/time, so I was doing an if statement of date time, but I wasn't getting the result I wanted. Sometimes the $now time is not within the yesterday 9pm to the 9pm today range. I don't know what I'm doing wrong, but I'm sure that it has something to do with the if statement, as the some of the $now time enters the else statement Here is my code: <?php $today = date('Y-m-d 00:00:00'); $nineyesterday = date('Y-m-d H:i:s', mktime(date("H") - (date("H") + 6), date("i") - date("i"), date("s") - date("s"), date("m") , date("d"), date("Y"))); $now = date('Y-m-d H:i:s', mktime(date("H") + 13, date("i"), date("s"), date("m") , date("d"), date("Y"))); $nineam = date('Y-m-d 09:00:00'); $nine30 = date('Y-m-d 09:30:00'); $ninepm = date('Y-m-d 18:00:00'); echo '9pm yesterday: '.$nineyesterday; echo '<br/>'; echo '9am: '.$nineam; echo '<br/>'; echo '9pm: '.$ninepm; echo '<br/>'; echo 'now: '.$now; echo '<br/>'; if ((strtotime($now) > strtotime($nineyesterday)) and (strtotime($now) <= strtotime($nineam))) { //count the answers by yes or no echo 'am'; } elseif ((strtotime($now) > strtotime($nineam)) and (strtotime($now) <= strtotime($ninepm))) { //count the answers by yes or no echo 'pm'; } else { echo 'error'; } ?> Thanks in advance
-
chmod - when or how does the group digit work
corbeeresearch replied to corbeeresearch's topic in Linux
Wow, that's mind boggling. Thanks -
I'm don't really much understand the 1st and 2nd digit of the chmod I know that 3rd means everyone. Owner means that only cpanel can control it right? how about group? do you need some php function to let chmod know it is a group? Thanks