This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1301. |
Solve : Accessing Menubar source code across numerous pages? |
|
Answer» Alright, here is my situation. I have created a website with a menubar across the top of each PAGE. I want to be able to have the menubar code in a separate HTML file and have each other page access that page so I only have to change the code on one page when I have to update the menubar and not 30 other pages. The only way that I have been able to find to do this is by setting up an SSI file. Unfoprtunately that requires me to change my pages to SHTML files and change some settings on the server. This is something I am not familiar with enough to do. Is there any other simple way to do this? I am stuck.Not using simple HTML, no. And doing that would make it so I wouldn't have to change any server settings? Oh YEA. Nothing to do with the server. Once you have all the files renamed, it involves adding about 3 lines of code (to every page) to display the whole menu on every page.Alright, SOUNDS good. I'll do some research into Php now. At least I have a little direction now. Thank you. |
|
| 1302. |
Solve : Javascript document.write? |
|
Answer» Would someone look at this statement and let me know why it won't PRINT. " + emissionyear(0) + "the world generated " + emissionamount(0) + " million metric tons of carbon dioxide EMISSIONS from fossil fuel consumption. ");document.write(" " + emissionyear(1) + "the world generated " + emissionamount(1) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");document.write(" " + emissionyear(2) + "the world generated " + emissionamount(2) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");document.write(" " + emissionyear(3) + "the world generated " + emissionamount(3) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. "); ;document.write(" " + emissionyear(4) + "the world generated " + emissionamount(4) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");document.write(" " + emissionyear(5) + "the world generated " + emissionamount(5) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");document.write(" " + emissionyear(6) + "the world generated " + emissionamount(6) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");/* ]]> */ Arrays are indexed in javascript via square brackets ([]) rather then parentheses.Some extra info |
|
| 1303. |
Solve : Designs and Design!!!!? |
|
Answer» Its really a problem to find out good site for cool web designs, after many web SURFING ..i FOUND some good site and some fack sites too give some good ad constructive suggestions.ok Quote i found this sites...like "<link>" and many sites... give some good ideas ...[/color]USE GOOGLE. |
|
| 1304. |
Solve : report from php to excel? |
|
Answer» >>>EI guys how to make a report in php that can be downloaded in ms excel? thanksTo use this, you'll need the PHP PEAR Library. |
|
| 1305. |
Solve : Downloading CGI file? |
|
Answer» If I download a CGI file from the internet, does the PAGE now live on my HARD drive or am I just calling up the live page when I open the file?If you download a CGI page from the internet, you'll only be DOWNLOADING the HTML it outputs.Thanks!! |
|
| 1306. |
Solve : php sql string querying with wildcard? |
|
Answer» I currently have a php file that runs when users SUBMIT text in certain fields around my site. Right now, the file only looks for specifics words I enter into a table, and it only finds exact words. What I want to do is have the sql tring be able to USE wildcard values around the {invalid_word} tag so it can FIND and prevent a user from submitting text if a long word contains the text on my banned list. Like, if I banned the word hair, and someone tried using the word hairball, it would let them. This is what the current php file code is |
|
| 1307. |
Solve : Why do you need to re-design your website?? |
|
Answer» Recently, I have received emails and calls from some companies in need of website re-design. They always come with the same question " why re-design?" if the information is already online. Did you know you can have a web site with no HTML?Don't start this again! Unless of course you mean something else. Quote from: kpac on January 22, 2010, 10:21:32 AM Don't start this again! Unless of course you mean something else.What else could it be? In a few years from now HTML will be history. But maybe the OP was not talking about HTML. Or maybe he was telling us HTML is doomed. Perhaps he might elaborate more. Quote In a few years from now HTML will be history.Explain.HTML is a bottleneck. Example, to read a sound file you hare to have some kind of plug-in for the browser that is not provided by HTML alone. Likewise for a video file. And the browser had be designed to use other kinds of script or p-code. Some parts of current web sites use a lot of java, not JavaScript. So it is just a matter of time web sites are going to be done in some other kind of code and the browser will request the advanced code instead of HTML. The page will load faster and the user will not be ABLE to see the source code. These kind of changes come faster that we can predict. Current problems with the INTERNET may dictate that HTML be dropped to improve performance and security. When that happens, all web sites will have to be re dinged, or at least translated into the new pseudo code. I may not be Java, but something along that line.I doubt that will happen for a long time. The W3C released XHTML Strict 1.0 not too long ago as the web's standard markup language. They didn't do that for nothing.Also, HTML5 came out. |
|
| 1308. |
Solve : Any way to add onto top?? |
|
Answer» Mysql.. |
|
| 1309. |
Solve : Need good AJAX framework? |
|
Answer» LATE last YEAR, I MADE a AJAX FRAMEWORK and it failed too much. What is the easiest AJAX framework? |
|
| 1310. |
Solve : Website Template Broken up??? |
|
Answer» Hi, |
|
| 1311. |
Solve : Streaming Video for Church? |
|
Answer» My local church as asked me to look into ways that we could possibly stream our church service with video and audio, as well as be able to access past recordings (archived for the last three recordings, if possible). In small community with Cable TV there may be free or low cost space on the local TV cable. If that is viable, people without computers could watch.They have thought about that, but we live out of the way from the city that holds the fiber and cable companies... not only that, but we would have to manage a broadcast schedule; not that this would be difficult, since you could just have the same thing loop, but to send it back to the cable and fiber companies would cost quite a bit in bandwidth. Quote from: kpac on January 23, 2010, 04:58:42 PM Have a look at this:The PRICE is workable for our funds, however it requires that you have your own local webhosting -- least, that's what I got out of it. I had Livestream.com recommended. Has anyone used that? The only problem is that the free version has some sort of monthly limit, from what I was told -- and the Pro Version is EXTREMELY pricey. Well I know that the Times Square New Year's party was broadcast on Livestream.com so it can't be bad. |
|
| 1312. |
Solve : How to make a presentation?? |
|
Answer» how can i connect different pictures and put music in the BACKGROUND to make a PRESENTATION in adobe PREMIERE? |
|
| 1313. |
Solve : Design Project Over 2 Weeks? |
|
Answer» Well i'm on the second week now so maybe you'll just ignore this, but still I'd like some professional feedback on my work as I throw myself into the world of Adobe ILLUSTRATOR :p |
|
| 1314. |
Solve : Validation of php drop down menu of month? |
|||
|
Answer» Cannot get it to validate, for leaps years, and feb,april 31.
I don't see a tag.You need to TELL it when to validate - you haven't told it that now. If there was a submit BUTTON you could validate when it was clicked, ETC. |
||||
| 1315. |
Solve : Linking External Stylesheet in table cell? |
|
Answer» Hi, I want one to be shown up inside other. I have used tables for the layout. In the lower half of the page I want the second page to appear.What do you mean? Like a frame? Quote Is it possible to get your second external stylesheet to link to a particular cell and not the entire page which would be using its own stylesheet.No, it's not. Why not just added classes or IDs to the table elements? Quote from: rseni on August 22, 2009, 11:10:15 AM I have two web pages each with their external stylesheet. I want one to be shown up inside other.Yep, frames would be the way to do that. Quote from: rseni on August 22, 2009, 11:10:15 AM However I want that table cell to inherit the styles defined in the stylesheet for the second page.Here's a reference which explains the three ways to insert CSS: http://www.w3schools.com/CSS/css_howto.asp. You need to use inline styles elements for the table cell, which is basically what kpac is also saying. Quote from: rseni on August 22, 2009, 11:10:15 AM I have used tables for the layout Is it 1999 again? -rock |
|
| 1316. |
Solve : javascript oop? |
|
Answer» I just want to ask what is the best ebook for javascript object oriented programming? And also can I download it for free on the NET? ThanxTry here: http://www.onlinecomputerbooks.com/free-javascript-books.phpHere is the most awesome JavaScript book EVER (REVIEW of it)! |
|
| 1317. |
Solve : Javascript / CSS files not uploading in dreamweaver cs4? |
|
Answer» Im sorry, I am not very good at explaining myself but I am gonna TRY to make this make sense. |
|
| 1318. |
Solve : Form field prompts? |
|
Answer» Hi, I have several text fields in a (frontPage) form. I would like to have words (in light gray) in the text boxes to prompt the USER as to the information needed. As soon as the user starts to type in the text box, the 'prompt' would disappear and only the users text would be submitted. I see this used all the time but don't know how it is done. Is it HTML or java or what? JavaScript. MODEL:Need more of a script so... Thanks, Ed Quote for each time I use this, changing 'MAKE' to each Id? I want to use this for 8 fields!Sorry, I didn't realise this was for more than one. You can use this instead: Code: [Select]<script type="text/javascript"> function changeColor(id) { var input = getElementById(id); input.style.Color = "#000"; input.style.fontStyle = "normal"; } </script> And the input field: Code: [Select]<input type="text" style="color:#CCC;font-style:italic;" value="Example Dodge" onfocus="changeColor(this.id); this.value='';" name="MAKE" id="MAKE" size="20" /> All you have to do is add id="MAKE" to every input field...as well as the onfocus function. Quote OK, Now I know I am becomming a pain.Don't worry about it. OK. I'm learning. See, you can teach an old dog new tricks! This part is still a problem: 2) The font is changing correctly but when the user puts data in the field the prompt does not disappear. Stays in background as user types input. Thanks. Ed Quote 2) The font is changing correctly but when the user puts data in the field the prompt does not disappear. Stays in background as user types input.Did you add onfocus="changeColor(this.id); this.value='';" to the field?Here is what i have: I am ALSO getting a script error on the above line. Maybe the line before is messing it up with the validation? EdHmmm, okay try this: Code: [Select]<input type="text" style="color:#808080;font-style:italic; margin-left:Dodge" value="Example Dodge" onfocus="changeColor(this.id);" onclick="this.value=";" name="MAKE" id="MAKE" size="20" maxlength="20" />Hi again, While I was taking your time trying to figure my error I reviewed everything and found the problem. I had used a " instead of ' ' , as in this.value=";" should have been this.value='';" Now it works and no script error. Thank You so very much for your patience with me. The related issue I'm having is with the confirmation page. My ISP PROVIDES one CGI script which they control. It gives a confirmation page to the customer. This page is called thankyou.html and it is in my control. The script also sends an e-mail. The e-mail SHOWS the field id and the user input. I can not get the user input to show up on the confirmation page. In the design of the page it shows the field confirmation as a webbot so that part appears to be correct. When it displays after input, it is blank where the user input should be. Is there a way to get this field data to the e-mail and the confirmation page? Thanks, Ed Have you got a link to the page?Yes, www.rubins.com/testing.html |
|
| 1319. |
Solve : Putting URL on page? |
|
Answer» Anyone know if it's possible to automatically put the current URL into the page. Say I want a LANDING page with the domain on it, but don't want to handcraft each page for each domain. |
|
| 1320. |
Solve : NEWBIE HELP!! Forms.? |
|
Answer» I am trying to create a staff control panel for my website so that certain staff can log in and modify areas of the website. |
|
| 1321. |
Solve : Front Page stretch all the way across the screen help? |
|
Answer» In the attachment image, is it possible to stretch the table all the way across the browser so that there won't be any gaps on the sides or on the top. |
|
| 1322. |
Solve : php report in pdf format? |
|
Answer» ahm here i am again seeking ANSWER in my QUESTION, how to MAKE a php report in pdf FORMAT? any one can help me?PDFlib needs to be installed on the server. |
|
| 1323. |
Solve : Blank Space between Divs? |
|
Answer» HEY CH forums. Been a while. I'm writing a webpage and I've run into something that I CANNOT figure out. here's the LIVE site: http://thomasrandolph.info/testing The issue is the blank area just above the footer. A look at the source shows this: Code: [Select]<div id="aboutme"> <div class="container"> <div class="content"> My name is Tom Randolph. <br /> This is my website. <br /> It's broken, so be nice: it's not live yet. </div> </div> </div> <div class="footer"> } <a href="index.php">Home</a> {} <a href="projects.php">Projects</a> {} <a href="BLOG.php">Blog</a> {} <a href="extra.php">About Site</a> { <br /> <a href="http://www.thomasrandolph.info">thomasrandolph.info</a> © 2009 Thomas Randolph </div> </div> </body> </html> As you can see, there is literally nothing but one space between the content and the footer. The CSS for the page is also in the source, and the applicable sections are: Code: [Select]/*-----about me-----*/ #aboutme { margin: 0; position: relative; top: -165px; left: 1px; } #aboutme .container{ margin-left: 1px; } #aboutme .container .content { font-family:Helvetica,Arial,Verdana,sans-serif; font-size:12px; background:#CCCCFF; height: 400px; padding: 45px 0px 0px 255px; margin: 0px 4px 0px 4px; -moz-border-radius:35px; -moz-box-shadow: 0px 5px 5px #666677; -webkit-border-radius: 35px; -webkit-box-shadow: 0px 5px 5px #666677; z-index:0; } #aboutme .container .content h1 { margin: 0; } /*-----end about me-----*/ /*-----footer-----*/ .footer { background-image: url(images/footer_bg.jpg); background-repeat: repeat-x; text-align: CENTER; padding: 4px 4px 4px 4px; margin: 10px 0px 0px 0px; height: 40px; -moz-border-radius-topleft:20px; -moz-border-radius-topright:20px; /*-moz-box-shadow: 0px -5px 5px #666666;*/ -webkit-border-top-left-radius: 20px; -webkit-border-top-right-radius: 20px; /*-webkit-box-shadow: 0px -5px 5px #666666;*/ position: absolute; bottom: 0; width: 100%; } /*-----end footer-----*/ I can't figure out where the space is coming from, and any help would be appreciated. If you need any more info, let me know. By the way, I'm building the page with PHP, so if that could be pulling in some ERRORS somewhere or something...? The gap isn't "noticeable" on almost all of the pages, because the footer is specifically placed at the bottom of the page. In the "Polls" page, however, it is still a particular distance from the bottom of the content div above it, and causes the scrollbars to be unnecessarily large. If there was no gap, the scrolling would be almost unnecessary. I'm not so worried about the scrollbars so much as a gap that I can't find the source of. -rock |
|
| 1324. |
Solve : How to put modules like in my space into front page? |
|
Answer» This PICTURE shows these modules being pointed to in yahoo. Is there a way I can get these in front page? |
|
| 1325. |
Solve : MySQL Query isn't working? |
|
Answer» I have all the connections and stuff. It does connect, or it would die(). BEWARE SQL INJECTION ATTACKS!I can help you there, if you like. Quote from: kpac on July 22, 2009, 02:43:16 PM I can help you there, if you like. If you use a decent library, there's nothing to worry about, really. What do you normally do, Kpac? Quote What do you normally do, Kpac?When hacking into websites? Well, it does help to know how to break into your own site, and because I do know how, I don't usually use a library. Usually just trial and error with me until I feel it's secure enough. PHP has some great functions for filtering content though. Quote from: kpac on July 23, 2009, 03:23:28 AM Usually just trial and error with me until I feel it's secure enough. So... a rigorous testing process then! Well, I've never used PEAR or a libary like that. STILL, I usually not bad at plugging all the holes. try this and see the difference. $query = mysql_query("UPDATE user SET Status = $ChangeTo WHERE username='$user';"); |
|
| 1326. |
Solve : How to use Action? |
|
Answer» How do you get the action code to direct to a file on hard DRIVE I tried |
|
| 1327. |
Solve : PERL script to get the last modified date and time? |
|
Answer» Hi friends, |
|
| 1328. |
Solve : codeigniter some error? |
|
Answer» I have a problem with the codeigniter, because when I view it in the browser., the expected output wont show,, instead it will only view my php codes. help me figure it out,,,I just get this output: db->query($sql); return $query; } function promoteMDUpdates($newMD, $rowBaseshop, $newLevelFromDate, $currentLevelEndDate, $newLevelEndDate) { /* 12:18 PM 2/11/2008 Update latest record of member_level with new endDate Insert new record to member_level with new MD, new fromDate and new endDate This will be a function that can and will be called by itself. */ //echo ""; //echo $rowBaseshop['lastName'].", ".$rowBaseshop['firstName']." ".$rowBaseshop['middleName']." (".$rowBaseshop['code'].")"; //echo " "; $sql = "UPDATE member SET MD = ".$this->db->escape($newMD)." , editedBy = ".$this->db->escape($this->session->userdata('userID')).", editedDate = ".$this->db->escape(NOWDATE)." WHERE code = '".$rowBaseshop['code']."' LIMIT 1; "; //echo " "; $this->db->query($sql); /* 10:19 AM 2/7/2008 If the baseshop member was recruited AFTER the MD's promotion, only update any records existing in member_level Else update the member_level and insert a new record */ $recruitedAfterPromotion = "FALSE"; // A flag to determine if baseshop member is recruited before or after the MD's promotion $sql = "SELECT * FROM member_level WHERE code = '".$rowBaseshop['code']."' "; $query = $this->db->query($sql); foreach($query->result_array() as $rowBaseshopML) { if($rowBaseshopML['fromDate'] > (substr($newLevelFromDate, 0, 10))) { $recruitedAfterPromotion = "TRUE"; } } //echo "flag? ".$recruitedAfterPromotion; //echo " "; if($recruitedAfterPromotion == "TRUE") { //echo " Recruited after promotion "; if( ($rowBaseshopML['endDate'] >= (substr($newLevelFromDate, 0, 10)) AND ($rowBaseshopML['endDate'] != FINALDATE)) ) { $sql = "UPDATE member_level SET endDate = ".$this->db->escape(substr($currentLevelEndDate, 0, 10)).", recruiter = ".$this->db->escape($newMD)." , MD = ".$this->db->escape($newMD)." , editedBy = ".$this->db->escape($this->session->userdata('userID')).", editedDate = ".$this->db->escape(NOWDATE)." WHERE code = '".$rowBaseshop['code']."' AND MD = '".$rowBaseshop['MD']."'; "; } else { $sql = "UPDATE member_level SET recruiter = ".$this->db->escape($_POST['code'])." , MD = ".$this->db->escape($newMD)." , editedBy = ".$this->db->escape($this->session->userdata('userID')).", editedDate = ".$this->db->escape(NOWDATE)." WHERE code = '".$rowBaseshop['code']."' AND MD = '".$rowBaseshop['MD']."'; "; } //echo "flagsql: ".$sql; //echo " "; $this->db->query($sql); } else { //echo " Recruited before promotion "; $sql = "UPDATE member_level SET endDate = ".$this->db->escape(substr($currentLevelEndDate, 0, 10)).", editedBy = ".$this->db->escape($this->session->userdata('userID')).", editedDate = ".$this->db->escape(NOWDATE)." WHERE code = '".$rowBaseshop['code']."' AND endDate = '".FINALDATE."' LIMIT 1; "; //echo $sql; //echo " "; $this->db->query($sql); $sql = "INSERT INTO member_level ( code, level, fromDate, endDate, recruiter, MD, createdBy, createdDate, editedBy, editedDate ) VALUES (" .$this->db->escape($rowBaseshop['code']).", " .$this->db->escape($rowBaseshop['level']).", " .$this->db->escape(substr($newLevelFromDate, 0, 10)).", " .$this->db->escape(substr($newLevelEndDate, 0, 10)).", " .$this->db->escape($rowBaseshop['recruiter']).", " .$this->db->escape($newMD).", " .$this->db->escape($this->session->userdata('userID')).", " .$this->db->escape(NOWDATE).", " .$this->db->escape($this->session->userdata('userID')).", " .$this->db->escape(NOWDATE)." )"; //echo $sql; $this->db->query($sql); } //search for this member's recruits and update their MDs as well by calling this function $sql = "SELECT * FROM member WHERE recruiter = '".$rowBaseshop['code']."' AND code != '".$_POST['exchangeLeg']."' ORDER BY lastName ASC"; $query = $this->db->query($sql); $rowBaseshop = $query->row_array(); if( $query->num_rows() > 0 ) { //echo " recruits: ".$query->num_rows(); foreach($query->result_array() as $rowBaseshop) { $this->adminmodel->promoteMDUpdates($newMD, $rowBaseshop, $newLevelFromDate, $currentLevelEndDate, $newLevelEndDate); } } //echo ""; //echo " "; } function getMemberLevel2($code, $effectivityDate) { // gets the member's level from the member_level table $sql = "SELECT * FROM member_level WHERE code = '".$code."' AND ('".$effectivityDate."' >= fromDate AND endDate >= '".$effectivityDate."') LIMIT 1"; $query = $this->db->query($sql); if($query->num_rows() > 0) { $row = $query->row(); return $row->level; } else { show_error('Error: Level not found for '.$code.' during the business date '.$effectivityDate); } } function sortHierarchy($hierarchy) { function _levelCompare($a, $b) { if($a['level'] == $b['level']) { if($a['rate'] < $b['rate']) { return 1; } else { return -1; } } elseif($a['level'] < $b['level']) { return -1; } else { return 1; } } usort($hierarchy, '_levelCompare'); return $hierarchy; } function fetchDate($dateYear=NULL, $dateMonth=NULL, $dateDay=NULL) { if($dateYear AND $dateMonth AND $dateDay) { $formattedDate = $dateYear."-".$dateMonth."-".$dateDay; } else { show_error('Incomplete Date fields'); } return $formattedDate; } function getMD($code, $info) { $sql = "SELECT MD FROM member WHERE code = ".$this->db->escape($code)." LIMIT 1"; $query = $this->db->query($sql); if($query->num_rows() > 0) { $row = $query->row(); $MDCode = $row->MD; } $sql = "SELECT * FROM member WHERE code = ".$this->db->escape($MDCode)." LIMIT 1"; $query = $this->db->query($sql); if($query->num_rows() > 0) { $row = $query->row(); } if($info == "name") { $memberName = $row->lastName.", ".$row->firstName." ".$row->middleName; return $memberName; } else { return $row->code; } } function createMemberInfo2($code, $name, $level, $generation, $rate, $payout, $execBonus, $WTRate, $CBRRate) { /* 4:56 PM 1/9/2008 Removed the element 'execRate' because that value is now used by 'rate' 3:57 PM 1/2/2008 Similar to createMemberInfo, except that it ALSO sets the other values that otherwise need to be computed. Used mainly for Company, CEO-MD Bonus, and Bonus Pool. */ $payout = round($payout, 2); $wtax = round(($payout * $WTRate),2); $cbr = round(($payout * $CBRRate),2); $netPayout = round(($payout - ($wtax + $cbr)),2); $member = array( 'code' => $code, 'name' => $name, 'level' => $level, 'generation' => $generation, 'rate' => $rate, 'payout' => $payout, 'execBonus' => $execBonus, 'wtax' => $wtax, 'cbr' => $cbr, 'netPayout' => $netPayout ); return $member; } function createMemberInfo($code, $name, $level, $generation, $rate, $payout) { //$payout = number_format($payout,'2','.',','); $member = array( 'code' => $code, 'name' => $name, 'level' => $level, 'generation' => $generation, 'rate' => $rate, 'payout' => $payout ); return $member; } function getExecutiveCommission($rate, $commission) { $executiveCommission = $commission * $rate; return $executiveCommission; } function getExecutiveCommissionVersion1 ($level, $SMDRate, $NMDRate, $levelSMD, $levelNMD, $SMDCommission, $NMDCommission, $netCommission) { $executiveCommission[] = array(); if($level == $levelSMD AND $SMDCommission == NULL) { //echo "SMD"; $executiveCommission['payout'] = $netCommission * $SMDRate; $executiveCommission['rate'] = $SMDRate; } elseif($level == $levelNMD AND $NMDCommission == NULL) { //echo "NMD"; $executiveCommission['payout'] = $netCommission * $NMDRate; $executiveCommission['rate'] = $NMDRate; if($SMDCommission == NULL) { $executiveCommission['payout'] += $netCommission * $SMDRate; $executiveCommission['rate'] = $NMDRate."(+".$SMDRate.")" ; } } else { $executiveCommission['payout'] = 0; $executiveCommission['rate'] = 0; } return $executiveCommission; /*if(($MDInfo['level'] > $levelMD) AND (($SMDCommission == NULL) OR ($NMDCommission == NULL)) ) { if($MDInfo['level'] == $levelSMD) { $executiveRate = $SMDRate; $SMDCommission = $executiveCommission = $netCommission * $executiveRate; } elseif($MDInfo['level'] == $levelNMD) { $executiveRate = $NMDRate; $NMDCommission = $executiveCommission = $netCommission * $executiveRate; } echo " Executive Commision: P".$executiveCommission." ( Rate: ".$executiveRate.")"; } */ } function getMDGenerationRateLeftover($code) { /* Get leftover commission from MD Generations */ switch($code) { case '1': $companyMDGenerationCommissionRate = 0.0975; break; case '2': $companyMDGenerationCommissionRate = 0.0475; break; case '3': $companyMDGenerationCommissionRate = 0.0275; break; case '4': $companyMDGenerationCommissionRate = 0.0125; break; case '5': $companyMDGenerationCommissionRate = 0.025; break; case '6': $companyMDGenerationCommissionRate = 0; break; default: $companyMDGenerationCommissionRate = 0.1925; break; } return $companyMDGenerationCommissionRate; } function getName($code, $table) { $sql = "SELECT * FROM ".$table." WHERE code = ".$this->db->escape($code)." LIMIT 1"; $query = $this->db->query($sql); if($query->num_rows() > 0) { $row = $query->row(); } $memberName = $row->lastName.", ".$row->firstName." ".$row->middleName; return $memberName; } function getMemberInfo($code, $effectivityDate=NULL) { $memberInfo = NULL; $sql = "SELECT * FROM member WHERE code = ".$this->db->escape($code)." LIMIT 1"; $query = $this->db->query($sql); //echo $query->num_rows(); if($query->num_rows() > 0) { $row = $query->row(); $memberInfo['code'] = $row->code; $memberInfo['lastName'] = $row->lastName; $memberInfo['firstName'] = $row->firstName; $memberInfo['middleName'] = $row->middleName; $memberInfo['level'] = $row->level; $memberInfo['MD'] = $row->MD; $memberInfo['recruiter'] = $row->recruiter; $query->free_result(); if($effectivityDate != NULL) { //echo " recruiterWithEffDate: ".$memberInfo['code']." ".$effectivityDate." "; $sql = "SELECT * FROM member_level WHERE code = '".$memberInfo['code']."' AND ('".$effectivityDate."' >= fromDate AND endDate >= '".$effectivityDate."') LIMIT 1"; //echo $sql; exit(); $query = $this->db->query($sql); if($query->num_rows() > 0) { $row = $query->row(); $memberInfo['level'] = $row->level; } else { $errorMessage = $code." does not exist in the database. This code refers to either the agent or part of the agent's hierarchy. Please check the member's database."; show_error($errorMessage); } } return $memberInfo; } else { $errorMessage = $code." does not exist in the database. This code refers to either the agent or part of the agent's hierarchy. Please check the member's database."; show_error($errorMessage); //quit(); //$data['details'] = $code." does not exist in the database"; //$this->load->view('error',$data); } } function getRecruiter($agentCode, $effectivityDate) { $sql = "SELECT * FROM member_level WHERE code = '".$agentCode."' AND ('".$effectivityDate."' >= fromDate AND endDate >= '".$effectivityDate."') LIMIT 1"; $query = $this->db->query($sql); if($query->num_rows() > 0) { $row = $query->row(); $getRecuiter = $row->recruiter; $query->free_result(); return $getRecuiter; } else { $errorMessage = $code." does not exist in the database. This code refers to either the agent or part of the agent's hierarchy. # Please check the member's database."; show_error($errorMessage); } } function getMemberRate($level) { //KBNotes 9:39 AM 12/15/2007: Are the level and rates fixed or should they be retrieved from a database? switch($level) { case '10': //Trainee Associate $memberRate = .32; break; case '20': //Associate $memberRate = .32; break; case '30': //FA $memberRate = .42; break; case '40': //SA $memberRate = .52; break; case '50': //MD $memberRate = .65; break; case '60': //SMD $memberRate = .65; break; case '70': //NMD $memberRate = .65; break; case '80': //CEO $memberRate = .65; break; default: $memberRate = .65; break; } return $memberRate; } function getGenerationRate($MDGeneration) { switch($MDGeneration) { case '1': $MDGenerationRate = .095; break; case '2': $MDGenerationRate = .05; break; case '3': $MDGenerationRate = .02; break; case '4': $MDGenerationRate = .015; break; case '5': $MDGenerationRate = .01; break; case '6': $MDGenerationRate = .0025; break; case '0': //CEO $MDGenerationRate = .01; break; default: $MDGenerationRate = 0; break; } return $MDGenerationRate; } function getGeneration($code, $levelCEO) { //$currentMD = $code; //$CEO = "0019AF"; //KBNOTE: change this to the CEO code later $counter = 0; $sql = "SELECT level, MD from member WHERE code = '$code' LIMIT 1"; $query = $this->db->query($sql); $row = $query->row(); $query->free_result(); //while($currentMD != $CEO) { while($row['level'] < $levelCEO) { $sql = "SELECT level, MD from member WHERE code = '".$row['MD']."' LIMIT 1"; $query = $this->db->query($sql); $row = $query->row(); $query->free_result(); //$currentMD = $row->MD; $counter += 1; } return $counter; } function getPartnerName($code) { //temp setup if($code == "PLPI") { return "Prudentialife Plans, Inc."; } elseif($code == "PLOP") { return "Prudentialife OPTIMA Funds, Inc."; } elseif($code == "PLHC") { return "Prudentialife HealthCare, Inc."; } elseif($code == "GP") { return "Generali Pilipinas"; } elseif($code == "PHI") { return "Philam Insurance"; } } function getProductName($code) { //temp setup if($code == "0005") { return "Life - Traditional - Basic"; } elseif($code == "0010") { return "Life - Traditional - Value Plus"; } elseif($code == "0015") { return "Life - Traditional - Premium"; } elseif($code == "0020") { return "Life - Flexi - Basic"; } elseif($code == "0025") { return "Life - Flexi - Value Plus"; } elseif($code == "0030") { return "Life - Flexi - Premium"; } elseif($code == "0035") { return "Life - Cremation - Basic"; } elseif($code == "0040") { return "Life - Cremation - Value Plus"; } elseif($code == "0045") { return "Life - Cremation - Premium"; } elseif($code == "0050") { return "Pension - Fund Starter"; } elseif($code == "0055") { return "Pension - Fund Builder"; } elseif($code == "0060") { return "Pension - Fund Builder Plus"; } elseif($code == "0065") { return "Pension - Premium Fund Builder"; } elseif($code == "0070") { return "Pension - Fund Secure"; } elseif($code == "0075") { return "Pension - Silver Fund Saver"; } elseif($code == "0080") { return "Pension - Wealth Builder"; } elseif($code == "0081") { return "Pension - Wealth Multiplier"; } elseif($code == "0082") { return "Pension - Wealth Multiplier Plus"; } elseif($code == "0085") { return "Education - PowerEd Persona A"; } elseif($code == "0090") { return "Education - PowerEd Persona B"; } elseif($code == "0095") { return "Education - PowerEd Prima"; } elseif($code == "0100") { return "Education - PowerEd Magna"; } elseif($code == "0105") { return "Education - PowerEd Summa"; } elseif($code == "0110") { return "Education - PowerEd Omni"; } elseif($code == "0115") { return "Primelife"; } elseif($code == "0120") { return "Serenity Gold"; } elseif($code == "0125") { return "Health Protect Plan 100"; } elseif($code == "0130") { return "Health Protect Plan 200"; } elseif($code == "0135") { return "Health Protect Plus - Plan 100"; } elseif($code == "0140") { return "Health Protect Plus - Plan 200"; } elseif($code == "0141") { return "Welcare Card Elite"; } elseif($code == "0150") { return "General Homeowner Protect"; } elseif($code == "0155") { return "Fire Commercial"; } elseif($code == "0160") { return "Commercial Vehicle"; } elseif($code == "0165") { return "Group Accident"; } elseif($code == "0170") { return "Private Car"; } elseif($code == "0175") { return "Fire General Business-Restaurant"; } elseif($code == "0180") { return "Fire Retail"; } else { $strSQL = "select *" ." "."from product" ." "."where code = {$this->db->escape($code)}"; $query = $this->db->query($strSQL); if ($query->num_rows() > 0) { $row = $query->row(); return $row->desc; } } } function getScholasticLevel($code) { if($code == "E") { return "Elementary"; } elseif($code == "HS") { return "High School"; } elseif($code == "C") { return "College"; } } function getModeOfPayment($code) { if($code == "SC") { return "Spot Cash"; } elseif($code == "A") { return "Annual"; } elseif($code == "SA") { return "Semi-Annual"; } elseif($code == "Q") { return "Quarterly"; } elseif($code == "M") { return "Monthly"; } } function getSaleType($code) { if($code == "I") { return "Individual"; } elseif($code == "G") { return "Group"; } } function getAdmin($code){ $sql = "SELECT * FROM users_admin WHERE id = ".$this->db->escape($code)." LIMIT 1"; $query = $this->db->query($sql); $row = $query->row(); if($query->num_rows() == 0) { return NULL; } else { return $row->lastName.", ".$row->firstName." ".$row->middleName; } } function getClientName($code) { $sql = "SELECT * FROM client WHERE code = '".$code."' LIMIT 1"; $query = $this->db->query($sql); $row = $query->row(); $query->free_result(); return $row->lastName.", ".$row->firstName." ".$row->middleName; } function getAgent($code){ $sql = "SELECT * FROM member WHERE code = ".$this->db->escape($code)." LIMIT 1"; $query = $this->db->query($sql); $row = $query->row(); if($query->num_rows() == 0) { return NULL; } else { return $row->lastName.", ".$row->firstName." ".$row->middleName; } } /** * Function for client's status by Joseph Ian G. * * param unknown_type $code * return unknown */ /*function getStatus($code) { $sql = "SELECT * FROM client WHERE code = '".$code."' LIMIT 1"; $query = $this->db->query($sql); $row = $query->row(); $query->free_result(); return $row->lastName.", ".$row->firstName." ".$row->middleName; }*/ function checkField($field, $fieldType) { if ($field==NULL) { return "".$fieldType." field missing. # "; } } function validateCode($code, $codeType, $table) { //echo "foobar ".$code; $errorMessage = ""; if($table == "client") { $sql = "SELECT * FROM client WHERE code = ".$this->db->escape($code)." LIMIT 1"; } else { $sql = "SELECT * FROM member WHERE code = ".$this->db->escape($code)." LIMIT 1"; } $query = $this->db->query($sql); if($query->num_rows() == 0) { $errorMessage .= "The ".$codeType." code is invalid or missing. "; } $query->free_result(); return $errorMessage; } function getMemberLevel($level) { $sql = "SELECT * FROM level WHERE code = ".$level." LIMIT 1"; $query = $this->db->query($sql); $row = $query->row(); $query->free_result(); return $row->name; } function getMonth($month) { $monthName = NULL; switch($month) { case "01": $monthName = "January"; break; case "02": $monthName = "February"; break; case "03": $monthName = "March"; break; case "04": $monthName = "April"; break; case "05": $monthName = "May"; break; case "06": $monthName = "June"; break; case "07": $monthName = "July"; break; case "08": $monthName = "August"; break; case "09": $monthName = "September"; break; case "10": $monthName = "October"; break; case "11": $monthName = "November"; break; case "12": $monthName = "December"; break; } return $monthName; } function getTitle($myTable, $myId) { $tempQuery = $this->db->getwhere($myTable, array(id => $myId) ); $tempRow = $tempQuery->row(); $tempQuery->free_result(); return $tempRow->title; } function getTalents($talentTypeId, $bookId) { //Get all the records that are related to this bookId. $query = $this->db->getwhere(relvar_books_talents, array(books_id => $bookId, talent_types_id => $talentTypeId) ); $num_rows = $query->num_rows(); for($i=0; $i < $num_rows; $i++) { $row = $query->row($i); $query2 = $this->db->getwhere(talents, array(id => $row->talents_id) ); $row2 = $query2->row(); $talents_string .= "id.">".$row2->first_name." ".$row2->middle_name." ".$row2->last_name.", "; } $talents_string = trim($talents_string); $talents_string = rtrim($talents_string, ','); $query->free_result(); return $talents_string; } function dropdownTalents($talentType, $query, $talent_types_id, $bookID) { //echo $bookID; //Create the drop down list $options = array(); foreach($query as $objectArray) { foreach($objectArray->result() as $row) { $fullName = $row->last_name.", ".$row->first_name." ".$row->middle_name; $options[$row->id] = $fullName; } } //Use asort to ALPHABETICALLY sort the names without re-indexing them. asort($options); $data = array( 'name' => $talentType.'[]', 'id' => $talentType, 'size' => '3', 'style' => 'width:50%', ); if($bookID) { //Get the selected writers who wrote in this bookCover $selected = array(); $whereArray = array(books_id=> $bookID, talent_types_id => $talent_types_id); $getTalents = $this->db->getwhere('relvar_books_talents', $whereArray ); //echo $getTalents->num_rows(); foreach($getTalents->result() as $tempRow) { $sql = $this->db->getwhere('talents', array(id => $tempRow->talents_id) ); foreach($sql->result() as $row){ $selected[] = $row->id; } } return form_multiselect($data, $options, $selected); } else { return form_multiselect($data, $options); } } function dropdownTalentsForAdd($talentType, $query, $talent_types_id) { //echo $bookID; //Create the drop down list $options = array(); foreach($query as $objectArray) { foreach($objectArray->result() as $row) { $fullName = $row->last_name.", ".$row->first_name." ".$row->middle_name; $options[$row->id] = $fullName; } } //Use asort to alphabetically sort the names without re-indexing them. asort($options); $data = array( 'name' => $talentType.'[]', 'id' => $talentType, 'size' => '3', 'style' => 'width:50%', ); return form_multiselect($data, $options); } function getTalentsController($talentID) { $query = $this->db->getwhere('relvar_talents_talent_types', array(talent_types_id => $talentID) ); $talentsArray = array(); foreach($query->result() as $row) { //echo "foo ". $tempRow->talents_id; $talentsArray[] = $this->db->getwhere('talents', array(id => $row->talents_id) ); //$getWriters[] = $sql->row(); } return $talentsArray; } function getAPV($code) { $sql = "SELECT * FROM client_product_app WHERE agent1 = '".$code."' OR agent2 = '".$code."' ORDER BY businessDate DESC"; $query = $this->db->query($sql); if($query->num_rows() > 0) { echo " "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; foreach($query->result() as $row){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo " Application Number Business Type APV Business Date ".$row->applicationNumber." ".$row->businessType." ".$row->apv." ".$row->businessDate." "; echo " "; } $query->free_result(); } } ?> Fatal error: Class 'Adminmodel' not found in C:\wamp\www\brokerage\system\libraries\Loader.php on line 184 Are you running it on a test server on just through a browser? e.g. is the address - http://localhost/page.php or: file:///C:\Documents\page.phpdude mura man n og orasyon ang imo expected output mka buang og bsahon Quote from: marjune on August 01, 2009, 05:26:10 AM dude mura man n og orasyon ang imo expected output mka buang og bsahon Wha..?Old topic. Locked. |
|
| 1329. |
Solve : Image Resize Possible?? |
|
Answer» Hi everyone, |
|
| 1330. |
Solve : Configuring NMS formmail on local web Server? |
|
Answer» I am newbie to web-designing and trying to to CONFIGURE NMS formmail This is a simple form First NAME Last Name E-Mail Pls Enter Your Comments: When i hit submit Firefox gives me an error "Firefox does not know how to open this address because the protocol isn't associated with any program. When i run the localhost\cgi-bin\FormMail.pl in Google Chrome it provides the following --------------------------------------… Error: GET request The HTML form fails to specify the POST method, so it would not be correct for this script to take any ACTION in response to your request. If you are attempting to configure this form to run with FormMail, you need to set the request method to POST in the opening form tag, like this: FormMail © 2001-2003 London Perl Mongers --------------------------------------… Pls help me resolve this error. Thanks for your kind suggestion and time.I don't know Perl, but I can spot one definite error. Quote Code: [Select]<form action="E:\xampp\cgi-bin\FormMail.pl" method="POST">That's what you have. That way, the file "FormMail.pl" will not be RAN through the server. You need to go to "http://localhost/cgi-bin/FormMail.pl" or "http://127.0.0.1/cgi-bin/FormMail.pl". |
|
| 1331. |
Solve : MySQL , PHP Database (for forums) wont work? |
|
Answer» All it does is display 1 thread. require "Database/connect.php";That probably won't work, depending on the server config. Try this: Code: [Select]require(dirname(__FILE__) . "/Database/connect.php");Yes, I made my own forums. And I just used math to do this one. And guess what? I built it in a week.. SADLY, I didn't have sql injection protection, and it was injected But, I do now Quote Sadly, I didn't have sql injection protection, and it was injectedBy who? And, and if you're really SERIOUS about this site, I'd recommend removing the item on the front page "Free domain name", since you don't actually offer a free domain name. |
|
| 1332. |
Solve : White space problem? |
|
Answer» Well, with the background color it's actually a light blue space problem . I am doing my first web page for a friend of mine, and cannot figure out how to CLOSE the gap between the first two lines by about a third to a half. I've searched NUMEROUS places on the web and have run out of luck. Here's what I first had as the code: you dont have to use hex you know you can say light blue. Just a tip Yeah, I know. I was looking at a color palate with the customer that had hex codes, and this was the color they picked. you may find it too be better since you can select the light or darkness of a certain color better. |
|
| 1333. |
Solve : Password protecting files online? |
|
Answer» I have the FOLLOWING file called .htaccess and I am trying to PASSWORD |
|
| 1334. |
Solve : Trying to find my URL for one of my sites? |
|
Answer» Domain is the location where your user account is set up |
|
| 1335. |
Solve : Continuous image marquee? |
|
Answer» Group: Members Posts: 1 Joined: Today, 08:34 PM Member No.: 11,016 Warn: (0%) ----- Hello All, I am adding a continuous image scroller to my website and am having issues with Windows Explorer...the code is below, can anyone help? Basically the last image scrolling to the left disappears before it reaches the END, #7 does not show up, and 1 and 6 overlap after the first go around. Script: <!--<br>// Jeff // www.huntingground.freeserve.co.uk // ********** User Defining Area ********** DATA=[ ["images/medical_modalities_trans.png","Alt / Title text for image 1","pic01.jpg"], ["images/cbct_trans.png","Alt / Title text for image 2","pic02.jpg"], ["images/pharma_trans.png","Alt / Title text for image 3","pic03.jpg"], ["images/surgical_care_trans.png","Alt / Title text for image 4","pic04.jpg"], ["images/pacs_trans.png","Alt / Title text for image 5","pic05.jpg"], ["images/veterinary_trans.png","Alt / Title text for image 6","pic06.jpg"], ["images/medical_modalities_trans.png","Alt / Title text for image 1","pic01.jpg"], ["images/cbct_trans.png","Alt / Title text for image 2","pic02.jpg"], ["images/pharma_trans.png","Alt / Title text for image 3","pic03.jpg"], ["images/dental_implants_trans.png","Alt / Title text for image 7","pic07.jpg"] // no comma at end of last index ] imgPlaces=5 // number of images visible imgWidth=156 // width of the images imgHeight=150 // height of the images imgSpacer=4 // space between the images dir=0 // 0 = left, 1 = right newWindow=1 // 0 = Open a new window for links 0 = no 1 = yes // ********** End User Defining Area ********** moz=document.getElementById&&!document.all step=1 timer="" speed=25 nextPic=0 initPos=new Array() nowDivPos=new Array() function initHIS3(){ for(var i=0;inewImg=document.createElement("IMG") newImg.setAttribute("id","pic_"+i) newImg.setAttribute("SRC","") newImg.style.position="absolute" newImg.style.width=imgWidth+"px" newImg.style.height=imgHeight+"px" newImg.style.border=0 newImg.alt="" newImg.i=i newImg.onclick=function(){his3Win(data[this.i][2])} document.getElementById("display_area").appendChild(newImg) } containerEL=document.getElementById("his3container") displayArea=document.getElementById("display_area") pic0=document.getElementById("pic_0") containerBorder=(document.compatMode=="CSS1Compat"?0:parseInt(containerEL.style.borderWidth)*2) containerWidth=(imgPlaces*imgWidth)+((imgPlaces-1)*imgSpacer) containerEL.style.width=containerWidth+(!moz?containerBorder:"")+"px" containerEL.style.height=imgHeight+(!moz?containerBorder:"")+"px" displayArea.style.width=containerWidth+"px" displayArea.style.clip="rect(0,"+(containerWidth+"px")+","+(imgHeight+"px")+",0)" displayArea.onmouseover=function(){stopHIS3()} displayArea.onmouseout=function(){scrollHIS3()} imgPos= -pic0.width for(var i=0;icurrentImage=document.getElementById("pic_"+i) if(dir==0){imgPos+=pic0.width+imgSpacer} // if left initPos=imgPos if(dir==0){currentImage.style.left=initPos+"px"} // if left if(dir==1){ // if right document.getElementById("pic_"+[(imgPlaces-i)]).style.left=initPos+"px" imgPos+=pic0.width+imgSpacer } if(nextPic==data.length){nextPic=0} currentImage.src=data[nextPic][0] currentImage.alt=data[nextPic][1] currentImage.i=nextPic currentImage.onclick=function(){his3Win(data[this.i][2])} nextPic++ } scrollHIS3() } timer="" function scrollHIS3(){ clearTimeout(timer) for(var i=0;i<imgPlaces+1;i++){ currentImage=document.getElementById("pic_"+i) nowDivPos=parseInt(currentImage.style.left) if(dir==0){nowDivPos-=step} if(dir==1){nowDivPos+=step} if(dir==0&&nowDivPos<= -(pic0.width+imgSpacer) || dir==1&&nowDivPos>containerWidth){ if(dir==0){currentImage.style.left=containerWidth+imgSpacer+"px"} if(dir==1){currentImage.style.left= -pic0.width-(imgSpacer*2)+"px"} if(nextPic>data.length-1){nextPic=0} currentImage.src=data[nextPic][0] currentImage.alt=data[nextPic][1] currentImage.i=nextPic currentImage.onclick=function(){his3Win(data[this.i][2])} nextPic++ } else{ currentImage.style.left=nowDivPos+"px" } } timer=setTimeout("scrollHIS3()",speed) } function stopHIS3(){ clearTimeout(timer) } function his3Win(loc){ if(loc==""){return} if(newWindow==0){ location=loc } else{ //window.open(loc) newin=window.open(loc,'win1','left=430,top=340,width=300,height=300') // use for specific size and positioned window newin.focus() } } // add onload="initHIS3()" to the opening BODY tag // --> Body: <BODY onload="initHIS3()"> <center> <div style="padding: 2px 0PX 0px 0px;"> <DIV id="his3container" style="position:relative; width:0px;height:0px; border:0px ;overflow:hidden"> <div style="background-image:url(images/gradient); background-repeat:repeat; width:858px; height:150px;" > <div id="display_area" style="position:absolute; left:0; top:0; width:0px; height:0px; clip:rect(0,0,0,0)"></div> </div> </DIV> </div> THANKS in advance! |
|
| 1336. |
Solve : MySql inbox broken.. (Also simple)? |
|
Answer» I tried USING WHERE id='$x' but if a user deleted a number in between, it would SKIP the LAST one, then on, and on, again. |
|
| 1337. |
Solve : Somethings wrong in my php function?? |
|
Answer» The idea: The <!-- comment here---> is for comments in PHP.No, they are HTML comments. /* This is a block of omments */ # One line comment // One line comment Those are PHP comments. Quote from: kpac on AUGUST 01, 2009, 04:24:38 AM No, they are HTML comments.But SINCE he's using echo those are comments and won't be shown.The "while" echoed in the middle of the HTML comment is what's throwing me... |
|
| 1338. |
Solve : Password Protecting HTML? |
|
Answer» I am trying to password protect a HTML file, but I do not want the whole file that I am trying to protect encripted or the .htaccess way of doing it. The OP has already indicated that he does to want to use server side methodsNo, he never did. He said the "htaccess" way of doing things. nothing about not using PHP or any other server-side method. Quote No, he never did. He said the "htaccess" way of doing things. nothing about not using PHP or any other server-side method. Sorry, I did not understand. Yes, PHP would be the way to go. |
|
| 1339. |
Solve : programming E-mail? |
|
Answer» Hello ... by any language yahoo did the service E-mail?I have no idea what you mean. Quote by any language yahoo did the service E-mail?What does "service email" mean? Quote from: feras on July 24, 2009, 12:59:16 PM Hello usually the best language to send e-mails to people in is one that they speak.Chortle. I suspect Yahoo developed his platform using a variety of different languages. In fact I'm sure of it, because they're certainly using javascript on some of the front end, and they will be using SOMETHING different on the back end. I'd hazard a guess at a MIXTURE of C, one of the OO variants (C++? J#? VB (ha ha ha!)?) and some server side scripting language like Perl or PHP. In addition there'll be a lot of heavy duty SQL going on somewhere.I think it could be done with PHP and mySQL. You just have to be VARY careful with security, especially making sessions and protecting against SQL injection. Quote from: TechGeek on July 31, 2009, 04:14:19 PM I think it could be done with PHP and mySQL. You just have to be VARY careful with security, especially making sessions and protecting against SQL injection. I don't think so... we're talking mailserver here, not web server. Quote from: BC_Programmer on July 31, 2009, 04:30:48 PM I don't think so... we're talking mailserver here, not web server. I think he WANTS to make his own mail service. Quote from: TechGeek on July 31, 2009, 05:31:41 PM I think he wants to make his own mail service. which would require a mail server. a web server could be set up to forward requests to the mail server and serve as a http intermediary to allow usage of the browser to view e-mail (much like hotmail and gmail and the like), but both will require a mail server. a Mail server would require a program or service to run on the machine, explicitly to serve POP3 and SMTP requests. mySQL and PHP on the other hand are more or less designed to be used with a web server that serves HTTP requests. quite different animals with quite different goals. Quote mySQL and PHP on the other hand are more or less designed to be used with a web server that serves HTTP requests.Yes, I often wondered how emails were retrieved, but there are no PHP or MySQL functions to do it. So, some other programming language must be used. I doubt the emails are STORED in a database anyway. Encryted files more likely. Anyway, this topic is old and doesn't look like getting up again... Quote from: kpac on August 01, 2009, 04:22:39 AM there are no PHP or MySQL functions to do it. Correction!Err, yeah.... I saw those. That's not what I was implying! |
|
| 1340. |
Solve : Another MySql error (simple)? |
|
Answer» Errm. |
|
| 1341. |
Solve : I would like to have a simi private informaion only web site? |
|
Answer» I would like to have a simi-private information only web site. No bells no whistles plan text, it needs to be secure as possible so it could not be copied and watermarked if it imagining software were used. I do what a real web site, not like http:// www. comcast.com/user/ditllty/documents/xgRe more like www.birdsinflight.comYou mean if you right click > view image, you get spacer.gif? -> How can I copyright or otherwise protect my images online? Quote I primarily would like to see the response by certain demographics and then to expand it.I'm not 100% sure what you mean here. Quote from: Circuit Breaker on January 31, 2010, 05:14:57 PM No bells no whistles plan text,So, the content will be plain text? There's really no effective way to prevent someone from copying from a web page and pasting to a file on their hard drive. Your options for protecting text content hinge on basic copyright law. So, put a copyright notice at the bottom of your pages.I trust the material in question is protected by a filed copyright? |
|
| 1342. |
Solve : MySQL won't add to database? |
|
Answer» I have the select_db and connections and stuff done.. But this won't ADD anything.. try this, just like this '15' and ;DEPENDING on the data type of the SQL field. If it's an INT, then you'll want no QUOTES, if it's, for example TEXT, CHAR, VARCHAR, and so on, then you'll want quotes around it. Quote from: Bannana97 on August 01, 2009, 01:53:40 PM I have the select_db and connections and stuff done.. But this won't add anything..This is one of those things that people get mixed up with. When inserting/updating database fields, you still have to use quotes around PHP variables for it to work. |
|
| 1343. |
Solve : MySql syntax error?? |
|
Answer» Heres the code: INSERT INTO inbox (to, from, id, sent, read, title, contents) VALUES ('$to', '$from', '$id', '$sent', 'false', '$sub', '$txt')The "read" field - is that a boolean? If so, remove the apostrophes around "false".Na, read is a text. Booleans don't work for me, for some reason. And yes, all the tables exist. Also, id is a number value. I tried making it $id, but it didn't work. And, contents is a LONGTEXT. Are the values too big for any of the fields? Ex: if the field for ID is INT(2), and the value $id is 111.Have you tried assigning the variables in the document just to see if it works? Then you would know if it's an error with the insert or getting the variables.Yes, I tried USING php on a page. It didn't do anything. And kpac, its INT(11), and the value is 2I think I realise what's wrong here. Notice in the SQL error, "to", "from", and "read" are in uppercase. I'm PRESUMING they're reserved keywords? Try changing the field NAMES to something else. |
|
| 1344. |
Solve : Web Pages!? |
|
Answer» Hi Every One The website can have the .ilovepie extension and still output HTML. mmmmm Pie... In either case it's not related to security. In this case, it's LIKELY a server-side ASP.NET script that generates the page, much like PHP or ASP or any number of server-side languages. of course if the server admin was weird he might decide that ASPX works just as well for delivering as pure HTML, as Treval pointed out. Of course that means that the admin cannot be trusted since he's crazy. For security reasons one might TRY to fool an attacker into thinking the site is ASP (.NET) by adding .aspx to every page but in fact the server is using PHP or something else! Like, have .aspx map to .php, lol!Yes, just use htaccess. Code: [Select]AddType application/x-httpd-php .foo Then just change all of your file extensions to .foo. If you don't want to change extensions: Code: [Select]Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)\.foo$ $1.php [NC] hello i am new here and i just want to tell you about nothingNo thanks.Webpage Extensions like .aspx is usually used by Web 2.0 services these days. Either .php (PHP) or .asp/.aspx (ASP). They are dynamic pages unlike .html pages. When I signed up for a Website, I had to get a provider supporting these extensions to increase usability.sigh... its not the EXTENSIONS that are supported. You could make ASP be a PHP file on a server that didn't support ASP if you wanted, that means that the EXTENSION for ASP would be "supported" but it wouldn't be supporting the use of actual ASP. Extensions are simply used to determine how the server will deal with the file. if it's a pl file, it might be passed through a perl interpreter server-side that outputs an HTML page. If it's PHP, same story, but with a PHP interpreter, and the same with ASP (which isn't really a language of it's own but rather the ability to use a number of different languages with the same set of ASP objects for returning a response to the browser, which, will be HTML.) The browser ALWAYS get's something it can understand (well, if everything works). This is always either HTML or XHTML. you cannot read a PHP file directly with a browser- you would just get program code. |
|
| 1345. |
Solve : Hw can I disp comma separatd txt data with analysed format in html with row wise? |
|
Answer» Hi |
|
| 1346. |
Solve : html help? |
|
Answer» If I use the CODE But why does this code not workThe tag is not in the W3 standards. It's kinda lame but you can know what works at http://w3schools.com/tags/default.asp. Quote It's kinda lame but you can know what works at http://w3schools.com/tags/default.asp. Why is it kinda lame?It's pretty simple, baby. solution You have to use: Code: [Select]<img src="abc.xyz" align="right"> Quote from: nymph4 on February 07, 2010, 10:43:33 AM <img src="photo A2.jpg" width="550" alt="" border="0" align="">I would think the absent value for the align attribute might have been a clue. |
|
| 1347. |
Solve : icon beside url address? |
|
Answer» hi, Just to add, make sure to clear your cache and delete your site of your fav's list to see new favicon.Thanks, got that added. |
|
| 1348. |
Solve : Indexing a Site? |
|
Answer» I've created a new site under a subdomain of a web site. Google Cant see to index it is it because its a subdomain? Also if I have to upgrade my site to get it indexed how do I get it out on the web. What sites would I USE to advertise my site. Any free ones I could use? I did try googling theses things with no luck. Any help I'd appreciate.google hasn't indexed it yet I think and also you probably have to submit your content to google. Quote Google Cant see to index it is it because its a subdomain?What? That makes no difference. Quote Also if I have to upgrade my site to get it indexed how do I get it out on the web.I have no idea what you mean here. Quote What sites would I use to advertise my site. Any free ones I could use?No. Create a sitemap and submit it to Google.You never need to pay to have google index your site. There's no "free" advertising because you have to do something for a network to get your site on there. You can have advertising where you don't need to pay, but you could MAKE lots of MONEY in the time you will put into earning that advertising time. |
|
| 1349. |
Solve : Javascript "Permission denied" with Arrays and match?? |
|
Answer» It errors me, "Permission denied" |
|
| 1350. |
Solve : Mouseover text? |
|
Answer» Hi, I need help FINDING a code that does this: |
|