Jump to content

zero_ZX

Members
  • Posts

    223
  • Joined

  • Last visited

Everything posted by zero_ZX

  1. So, after reviewing my code, it would appear that a variable was misspelled which is why the chance of winning was a set 30%..
  2. Hi, I basically want a function that takes a parameter which is a percentage chance of the functioning returning true. A user can move from tier 1->10 and at tier 1 there's a 70% chance to move to tier 2, from tier 2 there's a slightly less chance to move up, and so on. I tried with the following piece of code: public function rollTheDice($winnerPercentage) { $number = rand(1, 100); if ($number <= $winnerPercentage) return true; return false; } The above code makes logical sense to me: 1. Pick a random number between 1 and 100. 2. If that number is less than or equal to the percentage, then we passed (example, if the random number is less than or equal to 70.. there must be a 70% chance of this?) This however does not seem to work, in fact it appears that when simulating a roll, 70% fails at the very first step (where there is a 70% chance of winning..) To actually make it to tier 10, has yet to be accomplished, so by simulating this with unlimited attempts for 120 seconds straight doesn't seem to "win". I tried (just for fun) and change the if-statement so: if ($number >= $winnerPercentage) This seems to be working quite well, as the simulator quickly reaches tier 10 this way. Any suggestions to code changes, or can someone explain why it is working way better when exchanging less than with greater than?
  3. Hi, sorry about that, you made the correct assumption <title> '.$lang['PAGE_TITLE'].'</title> I thought the lang array was actually global as it's not in any function, would I need to declare the $lang variable global?
  4. I actually ran into some new issues. It appears that I cannot use the variables that I have now included. From my portolio.php I include the header.php <?PHP require_once("../../inc/common.inc.php"); require_once("inc/header.php"); DisplayHeader(); ?> From the header.php I include the main.php <?php //require_once("../inc/common.inc.php"); require_once("lang/main.php"); /** * Created by JetBrains PhpStorm. * User: Mikkel * Date: 05-08-13 * Time: 12:07 * To change this template use File | Settings | File Templates. */ function DisplayHeader(){ //.... } From the main.php I include a single language file: <?php //session_start(); //header('Cache-control: private'); // IE 6 FIX if(isSet($_GET['lang'])) { $lang = $_GET['lang']; // register the session and set the cookie // $_SESSION['lang'] = $lang; setcookie('lang', $lang, time() + (3600 * 24 * 30)); } //else if(isSet($_SESSION['lang'])) //{ // $lang = $_SESSION['lang']; //} else if(isSet($_COOKIE['lang'])) { $lang = $_COOKIE['lang']; } else { $lang = 'en'; } switch ($lang) { case 'en': $lang_file = 'en.php'; break; case 'da': $lang_file = 'da.php'; break; default: $lang_file = 'en.php'; } require_once ("lang/".$lang_file); ?> In which the variable $lang is set $lang = array(); $lang['PAGE_TITLE'] = 'My website page title'; Yet I receive this message: [Thu Aug 22 13:06:27 2013] [error] [client 83.92.74.170] PHP Notice: Undefined variable: lang in /home/thomsen/mikkel/inc/header.php on line 26,
  5. Hi kicken, Thanks a lot for you in-depth answer. It really helped me understand the include behind-the-scene - and solved my problem.I ended up using the common.inc as you did.
  6. So, depending on where I include the header from, I would need different paths for including the lang file? If so is there any alternative? I will be using different paths multiple times.
  7. Hi, I'm having issues with included files within included files. This is my project: I browse my portfolio.php and I receive this error: [Wed Aug 21 19:50:01 2013] [error] [client 83.92.74.170] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/home/thomsen/mikkel/html/portfolio/lang/main.php' (include_path='.:/usr/share/pear/') in /home/thomsen/mikkel/inc/header.php on line 3, referer: http://www.mikkel.thomsen.im/ In my portfolio.php I have: <?PHP require_once("../../inc/header.php"); $title = "Test"; ?> In my header.php I have: <?php require_once("../lang/main.php"); I don't know why it cannot get this file as I move up to my "project", into "lang" and fetch the file, which doesn't exists for some reason. This error is not caused by file permissions. Thanks in advance
  8. Thanks a lot
  9. Hi, I'm limiting a specific action to only be possible each 12 hour. To do that I use the current time: $time = strtotime(date("Y-m-d H:i:s")); and the last time the action was done is stored just like it (but from a db). Now I'm about to compare them, but I'm curious on how to make the last_vote variable 12 hours larger. I tried with 43200 which is 12 hours in seconds, but that appeared to be very incorrect. Any help is much appreciated.
  10. Yea that would be for generating the for which i can already do. I want to describe the fields by adding a label, and it will be a mess to store labels together with the forms.
  11. No I do not have any code. The problem is not coding, more like designing.
  12. Hi, I have a class that loops through a mysql table and then auto generates a form based on the table. It can ignore fields if there should be a need of that. Any way I would like to label the different inputs, provide descriptions etc, and would like to know an approach to this. What would you do in this case? I have a matching table containing settings where i could put a field and then it could contain a serialized array with the info, but not sure if there's a better alternative, please let me know
  13. This didn't work either. In mysql (where i get last_vote) it says: 2012-04-30 20:25:37 so a datetime. Hope it doesn't matter?
  14. Hi, So I only want my users to be able to perform certain tasks each 12 hours. This is the code I use: function canVote($ip, $vote_id, $updateTimer = true){ $time = date("Y-m-d H:i:s"); $this->CI->db->where('vote_id', $vote_id); $this->CI->db->where('user_ip', $ip); $this->CI->db->from('votes_voters'); $count = $this->CI->db->count_all_results(); /*$count = $this->CI->db ->where('vote_id =', $vote_id) ->where('user_ip =', $ip) ->from('votes_voters') -count_all_results();*/ $row = $this->CI->db ->where('vote_id =', $vote_id) ->where('user_ip =', $ip) ->get('votes_voters') ->row(); if($count == 0){ $data = array( 'vote_id' => $vote_id, 'user_ip' => $ip, 'last_vote' => $time ); $this->CI->db->insert('votes_voters', $data); return true; } else{ $last_vote = $row->last_vote; if($last_vote + strtotime("12 hours") < $time){ return false; } else{ if($updateTimer = true){ $data = array( 'last_vote' => $time, ); $this->CI->db->where('vote_id', $vote_id); $this->CI->db->where('user_ip', $ip); $this->CI->db->update('votes_voters', $data); } return true; } } } Apparently the failing bit is this: if($last_vote + strtotime("12 hours") < $time){ return false; } I believe you can guess what I'm trying to do here, if variable 1 + 12 hours is smaller than variable 2, then return false. Any help is much appreciated.
  15. Hi, So there have probably been loads of those questions however from what I've searched I have not been able to find the answer. So I receive this error, when using this function: function updateCart(row_id, item_qty) { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("item_place").innerHTML = xmlhttp.responseText; } } xmlhttp.open("POST",'<?php echo site_url("votepoints/updateCart/");?>',true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", row_id.length); xmlhttp.setRequestHeader("Connection", "close") xmlhttp.send("row_id="+row_id+"&item_qty="+item_qty); } The problem is the row_id item_qty works fine for some reason. I guess the difference is that qty is an int, and id is a string. Right, so Before the function i decided to put var row_id = ""; to see if that fixed the problem. Apparently it didn't. I'm calling the function via a link: javascript:updateCart(e22659b1a980aaca47048bebd5523817, 2) And this string generates this error for some reason, and I have no idea why.
  16. Hi, Perhaps you can help me if I misunderstood anything in the documentation. This function should return a date: private function date2($timeStamp, $dateFormat = '%A, %d. %B %Y @ %T'){ return strftime($dateFormat, $timeStamp); } But it returns bool(false). Right, so this also applies if I put it like this: private function date2($timeStamp, $dateFormat = '%A, %d. %B %Y @ %T'){ return strftime($dateFormat); } It also happens in major functions and not just test ones. I'm on Windows, using codeiginiter framework.
  17. Hi, I'm not very good with design I usually download a theme that does the trick However I'm having problems with this one, and guess I have to solve them myself. I have this short bit of HTML: <div class="arch_news" align="left"> <div class="arch_up"><!-- <font color="#20628e">posted by: Evil!</font> 00/00/0000--></div> <div class="arch_repeat"> <?php echo $row->page_content ?> </div> <div class="arch_end"></div> </div> Which works quite well, it displays everything correctly. The problem appears when there's any kind of html formatting in the page content. This is how the page looks like with HTML: Kindly notice that the border doesn't go all the way, but stops. So when I avoid HTML, and use a short line I get this result: This time the box display fine, but at the very bottom the header is "lifted" and doesn't stay down. Here's my CSS which I believe is the problem: /* CSS Document */ BODY { background:#000000; background-image:url(../images/background.png); background-position:top ; background-repeat:no-repeat; padding:0px; margin:0px; } .header { position:relative; width:989 px; padding:0px; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:13px; } .footer { position:relative; background: url(../images/foot_repeat.png) repeat-x; width:100%; height:90px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333333; text-shadow: #000000 0px 1px 1px; padding-top:20px; } .top_menu { position:relative; width:900px; height:26px; padding-top: 4px; margin-right:80px; } .top_menu a { font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#666666; text-decoration:none; outline:none; padding:10px; } .top_menu a:hover { color:#c93a0d;} .top_place { position:relative; background:url(../images/top_image.png); width:1014px; height:317px; padding-top:88px; } .slider_movie_place { position:relative; width: 554px; height: 280px; } .realms_status { position:relative; width:400px; height:280px; } .realms_status_title { background:url(../images/titles/realms_status.png); position:relative; width:232px; height:96px; margin-top:12px; } .realms_statu_2 { position:relative; width:400px; top:-15px; } .realms_sub { position:relative; height: 45px; width: 380px; margin-bottom: 2px; } .realm { position:relative; background: url(../images/realms_v1.png); width: 276px; height: 40px; left:45px; top: 3px; padding-left:6px; font-family:Arial, Helvetica, sans-serif; font-size:11px; line-height:170%; } /* Realm Icons */ .blizzlike_realm_ico { position:absolute; background-image:url(../images/icons/blizzlike_realm.png); width: 42px; height: 42px; padding:0px; margin:0px; } .fun_x60_realm_ico { position:absolute; background-image:url(../images/icons/fun_x60_realm.png); width: 42px; height: 42px; padding:0px; margin:0px; } .in_development_realm_ico { position:absolute; background-image:url(../images/icons/in_development_realm.png); width: 42px; height: 42px; padding:0px; margin:0px; } .soon_realm_ico { position:absolute; background-image:url(../images/icons/soon_realm.png); width: 42px; height: 42px; padding:0px; margin:0px; } /* Realm Icons EnD */ .realm_name { font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#CCCCCC; font-weight:600; text-shadow: #000000 0px 0px 2px; } .on_off_status { position:absolute; width:15px; height:17px; left:254px; top:17px; } .membership_bar { position:relative; background:url(../images/center_login_big_bg.png); width:936px; height:62px; right:24px; } /*Bonus Buttons */ .bonus_buttons { position:relative; width:458px; padding-top:10px; padding-left:12px; } .bonus_button {width: 145px; height:100%; position:relative; float:left; margin-left:5px;} .bonus_nutton_1 {position:absolute; top: 0px; left: 0px; cursor:pointer; width: 145px; height:46px;} .bonus_button_2 {position:absolute; top: 10px; left: 3px; color:#4d88b7; width: 145px; font-family:Arial, Helvetica, sans-serif; font-size:11px;text-shadow: #000000 0px 1px 1px;} /*Bonus Buttons End */ .membership_box { position:relative; width:450px; height:60px; padding-left:5px; } .membership_box_logget { position:relative; width:445px; height:55px; padding-left:10px; padding-top:5px; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#226a9b; text-shadow: #000000 0px 1px 1px; } .logget_ll { font-size:10px; color:#52626e; margin-bottom:5px;text-shadow: #000000 0px 1px 2px;} .membership_logget_links a { font-family:Arial, Helvetica, sans-serif; font-size:13px; text-decoration:none; outline:none; color:#8e2e11; padding-right:10px; } .membership_logget_links a:hover { color:#9a4d36} .username { background:url(../images/input_images/input_login_name_home.png); background-repeat:no-repeat; border:none; width:171px; height:28px; margin-top:6px; padding-bottom:5px; padding-left:5px; } .account_password { background:url(../images/input_images/input_login_password_home.png); background-repeat:no-repeat; border:none; width:171px; height:28px; margin-top:6px; padding-bottom:5px; padding-left:5px; } #input_text { font-family:Arial, Helvetica, sans-serif; font-variant:small-caps; font-size:14px; color:#226a9b; text-shadow: #000000 0px 0px 2px; } .login_button { position:absolute; top:8px; left:367px; outline:none; border:none; } .bonus_links { position:relative; text-align:right; padding-right:100px; } .bonus_links a { font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#133855; text-shadow: #000000 0px 1px 1px; text-decoration:none; outline:none; } .bonus_links a:hover { color:#265b84} .down_menu { position:relative; text-align:center; padding-right:40px; margin-bottom:10px; margin-top:10px; } .down_menu a { font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#666666; text-decoration:none; outline:none; padding:2px; } .down_menu a:hover { color:#c93a0d;} #gold_pixel { position:relative; padding:2px; } /* BODY */ .body { position:relative; width: 932px; padding:0px; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:13px; margin-bottom:30px; right:20px; } .left_side { position:relative; width:239px; } .right_side { position:relative; width:675px; } .shoutbox { position:relative; width:239px; margin-bottom:5px; } .sb_up_place { position:relative; background:url(../images/cont/shoubox_up_image.png); width:239px; height:189px; margin:0px; padding:0px; } .sb_messages_place { position:relative; background:url(../images/cont/shoubox_repeat_image.png); background-repeat:repeat; width:239px; margin:0px; padding-top:5px; padding-bottom:5px; } .sb_down_image { position:relative; background:url(../images/cont/shoubox_down_image.png); width:239px; height:9px; margin:0px; padding:0px; } .sb_name { background:url(../images/input_images/shout_box_name_input.png); background-repeat:no-repeat; border:none; width:83px; height:15px; margin-top:32px; margin-left:9px; padding-left:50px; padding-bottom:6px; } .sb_security { background:url(../images/input_images/shout_box_security_input.png); background-repeat:no-repeat; border:none; width:89px; height:15px; margin-top:3px; margin-left:9px; padding-left:62px; padding-bottom:6px; } .sb_message { background:none; background-color:none; margin-top:19px; margin-left:10px; border:none; width:218px; height:55px; padding:2px; padding-top:10px; } .sb_disabled { background:none; border:none; margin-left:10px; margin-top:5px; text-shadow: #000000 0px 0px 2px; font-family:Arial, Helvetica, sans-serif; font-size:11px; } #sb_text { font-family:Arial, Helvetica, sans-serif; color:#999999; font-size:11px; text-shadow: #000000 0px 1px 1px; } #sb_text1 { font-family:Arial, Helvetica, sans-serif; color:#19486c; font-size:13px; font-variant:small-caps; text-shadow: #000000 0px 1px 1px; } .sb_up_place a { font-family: Arial, Helvetica, sans-serif; font-size:15px; font-variant:small-caps; text-decoration:none; outline:none; color:#CCCCCC; text-shadow: #000000 0px 1px 1px; } .sb_up_place a:hover { color:#0099FF} .message { position:relative; padding:3px; width:224px; background:#080808; margin-left:5px; font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#6e6e6e; line-height: 3px; padding-top:5px; margin-top:7px; } .message_info { font-family:Arial, Helvetica, sans-serif; line-height:100%; font-size:10px; color:#376974; } .daily_poll { position:relative; width:239px; margin-bottom:5px; } .dp_up { position:relative; background:url(../images/cont/daily_poll_up_image.png); width:239px; height:31px; font-family:Arial, Helvetica, sans-serif; } .dp_info_center_place { position:relative; background:url(../images/cont/daily_poll_repeat_image.png); width:225px; padding-left:8px; padding-right:6px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#184567; text-shadow: #000000 1px 1px 1px; } .dp_end_image { position:relative; background:url(../images/cont/daily_poll_down_image.png); width:239px; height:34px; padding-top:15px; } .dp_radio { } .text_3 { font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#736763; text-shadow: #000000 1px 1px 1px; font-weight:600; } .dp_end_image a { font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:bold; text-decoration:none; outline:none; text-shadow: #000000 1px 1px 1px; color:#8d9296; } .dp_end_image a:hover { color:#CCCCCC;} /* Right Bonus Table*/ .right_bonus_table { } .rb_up { position:relative; background:url(../images/cont/right_bonus_table_up_image.png); width:227px; height:28px; font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold; color:#dedede; text-shadow: #000000 1px 1px 1px; font-variant:small-caps; padding-left:12px; padding-top:5px; } .rb_repeat { position:relative; background:url(../images/cont/right_bonus_table_repeat_image.png); width:219px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#999999; font-weight:bold; padding-left:10px; padding-right:10px; } .rb_down_end { position:relative; background:url(../images/cont/right_bonus_table_down_image.png); width:239px; height:10px; font-family:Arial, Helvetica, sans-serif; } /* Right Bonus Table End*/ /* Latest News */ .latest_news { position:relative; width:675px; margin-bottom:10px; margin-left:15px; } .ln_up { position:relative; background:url(../images/cont/latest_news_table_up_image_v1.png); width:668px; height:29px; text-align:right; font-family:Arial, Helvetica, sans-serif; font-size:11px; font-weight:bold; color:#898989; text-shadow: #000000 1px 1px 1px; padding-top:6px; padding-right:7px; } .ln_repeat { position:relative; background:url(../images/cont/latest_news_table_repeat_image.png); width:655px; font-family:Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold; color:#636363; text-shadow: #000000 1px 1px 1px; padding-left:10px; padding-right:10px; } .ln_end { position:relative; background:url(../images/cont/latest_news_table_down_image.png); width:675px; height:11px; } .ln_links { /* unvisited link */ text-decoration: underline; font-weight: none; font-style:italic; color: #1c5476; } /* Latest News */ /* Sub Table */ .sup_table1 { position:relative; width:675px; margin-bottom:10px; margin-left:15px; } .st_up { position:relative; background:url(../images/cont/latest_news_table_up_image_v1.png); width:668px; height:29px; text-align:right; font-family:Arial, Helvetica, sans-serif; font-size:11px; font-weight:bold; color:#898989; text-shadow: #000000 1px 1px 1px; padding-top:6px; padding-right:7px; } .st_repeat { position:relative; background:url(../images/cont/latest_news_table_repeat_image.png); width:665px; font-family:Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold; color:#636363; text-shadow: #000000 0px 0px 2px; padding-left:5px; padding-right:5px; } .st_end { position:relative; background:url(../images/cont/latest_news_table_down_image.png); width:675px; height:11px; } /* Sub Table End */ /* Account Panel */ .acc_panel_manu { position:relative; background:url(../images/in_sub_page_menu.png); width:664px; height:30px; padding-top:11px; } .acc_panel_manu a { font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; color:#CCCCCC; text-decoration:none; outline:none; padding-right:0px; } .acc_panel_manu a:hover { color:#999999;} .account_panel_options_table {padding:10px;} .account_panel_options_table a { font-family:Arial, Helvetica, sans-serif; font-size:13px; font-weight:100; text-decoration:none; outline:none; color:#990000; } .account_panel_options_table a:hover { color:#333333} .account_panel_inside_tittle { font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#CCCCCC; margin-bottom:6px; } .account_panel_inside_info { font-family:Arial, Helvetica, sans-serif; margin-bottom:2px; } .acp_option_title_info { position:relative; padding:5px; -moz-border-radius:7px; -webkit-border-radius:7px; background:#0d0d0d url(../images/table_background_rep.png) repeat-x top; margin-bottom:10px; padding-left:5px; padding-top:10px; border-bottom: solid 1px #1f1f1f; border-left: solid 1px #1f1f1f; border-right: solid 1px #1f1f1f; } #g_circ { position:relative; padding-top:2px; padding-right:2px; padding-left:0px; padding-bottom:2px; } /* Account Panel EnD */ /* BODY End */ /* Body Sub Page */ .body_sub { position:relative; width: 932px; padding:0px; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:13px; margin-bottom:30px; right:20px; text-shadow: #FFFFFF 0px 1px 1px; } .body_sub_main_table { position:relative; width:597px; margin-bottom:60px; } .bsm_up_bar { position:relative; background:url(../images/cont/sub_page_up_image.png); width:547px; height:78px; padding-top:20px; padding-left:50px; } .bsm_repeat_place { position:relative; background:url(../images/cont/sub_page_repeat_image.png); width:567px; padding-left:15px; padding-right:15px; padding-top:10px; padding-bottom:8px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#979797; } .bsm_end { position:relative; background:url(../images/cont/sub_page_down_image.png); width:597px; height:45px; } .sub_page_ico{ position:relative; background:url(../images/icons/ico_1.png); width:50px; height:72px; float:left; } .page_title { position:relative; width:256px; height:49px; float:left; margin-top:15px; } .registration_info { position:relative; background:#c7c7c7; padding:7px; margin-bottom:20px; -moz-border-radius:10px; -webkit-border-radius:10px; text-shadow: #848484 1px 0px 1px; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#FFFFFF; font-weight:bold; } .registration_info a { font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#e33f0c; font-weight:bold; text-decoration:none; outline:none; } .registration_info a:hover { color:#a83510;} .registration_info_2 { position:relative; background:#c7c7c7; padding:7px; margin-bottom:10px; margin-top:10px; -moz-border-radius:10px; -webkit-border-radius:10px; text-shadow: #848484 1px 0px 1px; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#f1f1f1; font-weight:bold; } .registration_info_2 a { font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#e33f0c; font-weight:bold; text-decoration:none; outline:none; } .registration_info_2 a:hover { color:#a83510;} .reg_username, .reg_sec_answ { background:url(../images/input_images/rr_input_1.png); width:237px; height:40px; border:none; padding:0px; margin-bottom:5px; padding-left:10px; } .reg_password { background:url(../images/input_images/rr_input_2.png); width:209px; height:40px; border:none; padding:0px; margin-bottom:0px; padding-left:10px; } .reg_email { background:url(../images/input_images/rr_input_3.png); width:261px; height:40px; border:none; padding:0px; margin-bottom:5px; padding-left:10px; } #regiter_input_text { font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; color:#FFFFFF; text-shadow: #000000 1px 0px 2px; } .reg_sec_answ { background:url(../images/input_images/rr_input_1.png); width:237px; height:40px; border:none; padding:0px; margin-bottom:5px; padding-left:10px; } .select { position: absolute; width: 227px; height: 30px; padding: 10px 10px 0 10px; color: #fff; font: 12px/21px arial,sans-serif; background: url(../images/input_images/rr_input_drop.png); overflow: hidden; border:none; text-shadow: #000000 0px 1px 1px; } .bsm_repeat_place a { outline:none; } /* Body Sub Page End */ /* Realms */ .realm_name_info { position:relative; padding:10px; } #realm_name_rp { font-family:Arial, Helvetica, sans-serif; font-size:18px; font-weight:bold; color:#CCCCCC; text-shadow: #000000 0px 0px 2px; padding-left:10px; } #realm_info_title { font-family:Arial, Helvetica, sans-serif; color:#45647f; font-size:11px; padding-bottom:5px; padding-left:10px; } .realm_information { position:relative; padding:7px; background:#000000; -moz-border-radius:7px; -webkit-border-radius:7px; margin:5px; } .realm_full_information { position:relative; padding:10px; background:#000000; -moz-border-radius:7px; -webkit-border-radius:7px; margin:5px; } .realm_name_fi { font-family:Arial, Helvetica, sans-serif; font-size:18px; font-weight:bold; color:#CCCCCC; text-shadow: #000000 0px 0px 2px; padding-bottom:10px; } .realmstatus_fi { position:relative; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px; background:#161616; margin-bottom:8px; } .realm_info_fi { position:relative; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px; background:#161616; margin-bottom:8px; } /* REALMS End */ /* Archived News */ .months_bar { position:relative; background:url(../images/center_archn_menu_big_bg.png); width:919px; height:52px; margin-bottom:10px; padding:5px; } .months_bar a { font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:700; text-decoration:none; outline:none; padding:8px; text-shadow: #000000 0px 1px 1px; color:#CCCCCC;} .months_bar a:hover { color:#4d6570; } .big_sub_page_title { position:relative; font-family:Arial, Helvetica, sans-serif; font-size:11px; font-weight:bold; color:#4688a7; text-shadow: #000000 0px 1px 1px; } .arch_news { position:relative; width:675px; margin-bottom:10px; } .arch_up { position:relative; background:url(../images/cont/arch_news_up_image.png); width:922px; height:29px; text-align:right; font-family:Arial, Helvetica, sans-serif; font-size:11px; font-weight:bold; color:#898989; text-shadow: #000000 1px 1px 1px; padding-top:6px; padding-right:7px; } .arch_repeat { position:relative; background:url(../images/cont/arch_news_repeat_image.png); width:909px; font-family:Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold; color:#636363; text-shadow: #000000 1px 1px 1px; padding-left:10px; padding-right:10px; } .arch_end { position:relative; background:url(../images/cont/arch_news_down_image.png); width:929px; height:11px; } /* Archived News END */ /* Links */ Any help is much appreciated.
  18. One user creates a form for a specific demand and other users fill it. User2 might need the users to answer different questions. So he needs another form.
  19. Hi, So I would like my users create their own forms using my website. Other users of the website can then fill out the form. I was thinking about how to do this, and came up with some examples, first one is probably the most easy one, simply to have a table in the db called forms, containing, who owns it, if it's active etc. Then have one called form_elements that contained and element id, what assigned form, and what type of element is (drop-down, checkbox, textarea etc.) Then for each form created i create a <form-name>_answers that contain all the submissions for a particular form. I dunno if this is a good idea, I don't think it's used much, but very unsure. The second looks like the second, except that instead of all forms having their own answer table, i have a single answer table, and just store the entire response in an array. Any advice, suggestions, or ideas are greatly appreciated.
  20. Hi, I would like my users to create and save forms via mysql. They should be able to choose what field they want to use, and other users should be able to fill the forms into mysql. Any ideas on how to accomplish this?
  21. Hi, I'm currently coding a script, where I would like to post news & versions changes etc into my client's portal. So my client install the script, they login to the admin area, and they see messages from me, optionally if there's a new version available. I was thinking about doing this with cUrl, and just have a page that display my news, and then call it from the client portal, not sure about it though. What would you guys suggest?
  22. Hi, I was wondering if any one can help me out with this little issue. I select some data, and put it on a while loop, so something like while($row = mysql_fetch_array($result)){ body } but at the very last element in the array I'd like to something a little different than else. So, i have 4 elements. For the first 3 I'd like to print element1, element2, element 3, element4 Notice the missing comma at element4
  23. zero_ZX

    BBcode

    Thanks for the replies.. I found this library, and it was very usefull. I'm sure yours works as well, this was a bit faster though http://nbbc.sourceforge.net/
  24. zero_ZX

    BBcode

    Hi, Any one got some tips on this? I found a pecl package, but it seemed very difficult, that I had to install different stuff. I wonder that when I use (for example) SMF, bbcodes just work, without installing anything on my server, so what are those guys using? I would really appreciate if I didn't have to install anything.
  25. You put like you want car type 1, and it must be available from date_start to date_end Then it should show all cars of type 1, not reserved in period date_start and date_end.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.