Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. It is the php.info option that I checked first. The session.cookie_path directive indicates local and master values of /. The session.save_path directive indicates no value for both the local and master settings. My session.cookie_lifetime option is set to 0 -- likely the default. Now, I know what a session.save_path file looks like in a directory, as I created two on the fly using the session_save_path() function. They always begin with the prefix "sess" -- for example, sess_n1kto7vp86c9nr8po7rl99im03. In contrast, I have never seen a cookie txt file and do not know what to look for. Am I correct to assume that the forward slash refers to the top level of my machine? Roddy
  3. How to edit my w3schools bootstrap website

    I don't understand what you mean by editing page? all editing can be done through an editor like notepad++, this will edit, bootstrap css and JavaScript, but it would be better to create your own custom css to override bootstrap css, and custom js, for you own JavaScript.
  4. Yesterday
  5. Feedback on database design

    I'm talking about the columns in the game table, not the gametag and gameplatform tables. The unique constraint on something like the gametag table should be the gameID and tagID, not an autonumber. The combination of the gameID and tagID is what needs to be unique, you wouldn't want multiple records with the same values for those fields. That's why it should be the primary key, and making it the primary key will also help with searching.
  6. The $_SESSION Variable - Who Owns It? Where Is It Stored?

    All options have multiple ways to get set, and a default. You can create a phpinfo page to check the local and master values of every setting. They describe the default behavior, your configuration might differ. That will be the session.cookie_lifetime option. http://php.net/manual/en/session.configuration.php
  7. i created a website using w3schools bootstap. it was a while ago and i can't remember how to get to the editing page. could someone help me please. thanks, steve
  8. Yes, the session.save_path directive is present, but in my configuration it is commented out. Still the information contained in the $_SESSION superglobal is being saved somewhere. How would you recommend that I discover where the information is kept. Running the session_save_path( ) function does not reveal the location. Also, please read this quote from W3Schools and then my original entry. My observation appears to contradict W3Schools. Can you explain why? Roddy
  9. I need the same thing but for the NEW w3.css (version 4) The nav bar code is much different and so the javascript would need a small updating. I know this would help a great number of people since it is one of the small drawbacks to using w3.css in the "real world"
  10. Combine W3JS and W3CSS

    Yes the framework look pretty but need the javascript "engine" to get it to do any heavy work.
  11. I would also suggest the addition of some javascript snippet for 2 or more dropdown menus in the nav bar. Every example uses only one and they need one nav bar with everything included. I love the framework. Thanks Mike
  12. Feedback on database design

    No they're not left overs, the GameTag and GamePlatform tables are the intermediary tables to satisfy the many-to-many relationships between Game and Tag and Game and Platform respectively. They both contain their own ID and both foreign keys of the tables they connect. They just don't look necessary because my relationships aren't visible. I could do a composite key like you're saying, but as-is I have a dedicated ID for each table for uniqueness.
  13. Localhost

    Maybe you didn't do the port fowarding thingy correctly, or maybe your ISP is just blocking incoming traffic on port 80.
  14. Feedback on database design

    Are the GameTagID and GamePlatformID columns in the game table left over from something else? It doesn't look like those are necessary. For the gameplatform and gametag tables, I would get rid of the int primary key and make both of the other columns part of the primary key, so that you can enforce unique data there.
  15. Subir archivo en la misma página

    If you want to upload a file using ajax, the best way to do it is to use the FileReader object. https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications
  16. Please help a newbie

    Instead of printing your own error message, print the actual error message from MySQL. http://php.net/manual/en/mysqli.error.php
  17. The $_SESSION Variable - Who Owns It? Where Is It Stored?

    The location of the files is also configured in php.ini, in session.save_path. On our servers, for example, it stores session files in /var/cpanel/php/sessions/ea-php56 when the account is running PHP 5.6. This is not significant to a PHP programmer though, it's not important how the data actually gets stored unless you're trying to write your own session storage handler (and the vast majority of programmers have no reason to do this). The important part is that it works.
  18. something I cannot understand in javascript code

    Well, if you know what a subset is, and you know that this function finds subsets, then you should be able to figure out the answers to some of those questions. It's the number of possible subsets. That's how it determines which elements to pull from the source array for each subset. If you run the version I posted with all of the output it makes it more obvious. That's backwards, it subtracts 1 from the array length, and that is the index of the last element in the array. It's the minimum size for the returned subsets. Passing 2 means they aren't interested in the subsets with a length of 0 or 1.
  19. How to add multiple images within a modal

    Bootstrap is NOT a editor, its a framework of predefined classes, JavaScript that is used to style, and manipulate elements (example modal, sideshow) so it works! in a responsive manner. IF you look at links at top with bootstrap, they are linking externally to these files, same with jquery. I see you are opening the file directly from O/S filesystem, and not on local server wamp or xamp, then that could be problem, if linking to bootstrap and jquery externally. These files have to be downloaded to specific location, especially when linking to glyph icons in fonts folder.
  20. Subir archivo en la misma página

    Estoy subiendo un archivo csv en una página llamada procesar, el problema es que me hace un POST y me envía a otra página y me muestra el resultado de ¡La importación del archivo se subió satisfactoriamente!, pero yo necesito que eso me lo muestre en la misma página. Éste es el código que tengo. <script type="text/javascript" > $(function(){ $("#btnEnviar").click(function(){ $("#cuerpoPagina").load('procesar.php',$("#frmAsignar").serialize()); }) }); function subirArchivoExcel() { if (document.frmSubirArchivo.excel.value == "") { alert("¡Error!. ¡Debe subir un archivo!"); document.frmSubirArchivo.excel.focus(); return false; } document.frmSubirArchivo.action="procesar.php"; document.frmSubirArchivo.submit(); } </script> <?php echo '<form name="frmSubirArchivo" action"procesar.php" method="post" enctype="multipart/form-data"> <table border="1" id="TablaFormularioOpaco"> <tr> <td aling="center" id="TituloTablaVerde">Archivo excel</td> </tr> <tr> <td><input type="file" name="excel" /> </td> </tr> <tr> <td><input type="button" name="btnEnviar" id="btnEnviar" value="Subir Archivo" onclick="subirArchivoExcel();" ></td> </tr> </form>'; Ahora acá es el resto del código: include 'Conexion.php'; if (isset($_FILES['excel']) && !empty($_FILES['excel']) && substr($_FILES['excel']['name'],-3)=="csv") { $fecha = date('Y-m-d'); $hora = time("HH:MM:SS"); $carpeta = "Ejemplo"; $carpeta = ""; $excel = $fecha."-".$hora."-".$_FILES['excel']['name']; move_uploaded_file($_FILES['excel']['tmp_name'], "$carpeta$excel"); //echo "$carpeta$excel"; //print_r($_FILES); $contador = 0; $row = 1; $fp = fopen("$carpeta$excel", "r"); $meses = array( 'ENERO' => '01', 'FEBRERO' => '02', 'MARZO' => '03', 'ABRIL' => '04', 'MAYO' => '05', 'JUNIO' => '06', 'JULIO' => '07', 'AGOSTO' => '08', 'SEPTIEMBRE' => '09', 'OCTUBRE' => '10', 'NOVIEMBRE' => '11', 'DICIEMBRE' => '12'); //echo $dias; //fgetcsv. obtiene los valores que estan en el csv y los extrae while ($data = fgetcsv($fp, 1000, ";")) { //Si la línea es igual a 5 no guardamos porque serian los títulos de la hoja de excel if ($row >= 7) { //print_r("<pre>Row: ".$row); //print_r($data); //print_r("</pre>"); // TEXTO: jueves, 01 de junio de 2017 21:38 $laFecha = explode(",", $data[1]); if(count($laFecha) == 2) { $fecArchivo = explode(" ", $laFecha[1]); //print_r($fecArchivo); $anno = $fecArchivo[5]; $mes = $meses[strtoupper($fecArchivo[3])]; $dia = $fecArchivo[1]; $hora = $fecArchivo[6]; $fechaReal = $anno."-".$mes."-".$dia; //echo $fechaReal; //echo $contador." - "; $sql_guardar = 'INSERT INTO registros ( Dia, Hora, Tipo_Acceso, Puerta, Tipo, Tarjeta, Nombres, Apellidos, Documento, Empresa)'; $sql_guardar .= 'VALUES( "'.$fechaReal.'", "'.$hora.'", "'.$data[2].'", "'.$data[3].'", "'.$data[6].'", "'.$data[7].'", "'.$data[8].'", "'.$data[9].'", "'.$data[10].'", "'.$data[12].'")'; $contador++; //echo "7: ->".$data[7]."<- 10:->".$data[10]."<-"; if ($data[7] != '') { //echo $sql_guardar; //print_r("<pre>"); // print_r($sql_guardar); //print_r("</pre>"); mysql_query($sql_guardar) or die(mysql_error()); if (!$sql_guardar) { echo '<div>¡Hubo un problema al momento de importar el archivo! <br>¡Por favor vuelva a intentarlo!</div>'; exit; } } } } $row++; } fclose($fp); echo '<div>¡La importación del archivo se subió satisfactoriamente!</div>'; exit; } ?>
  21. Feedback on database design

    Perfect! Ok, so for this first post there are basically 5 tables: Game Tag Platform Developer Publisher Two of which have many-to-many relationships with the Game table, so each of those two have intermediary tables: GameTag GamePlatform The Tag table is a combination of genre's and all the other descriptors that we use to describe games that aren't genre's, things like Open World, Co-op and Sandbox. Actual genre's will bubble to the top. And bear with me please, I realize some portions of development get farmed out to other developers and teams collaborate all the time, but for the sake of simplicity I've decided to make relationship between Developers and Games a one-to-many relationship. Having said that, here are my scripts for creating the tables: CREATE TABLE Developer ( DeveloperID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, Developer VARCHAR(45) ); CREATE TABLE Publisher ( PublisherID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, Publisher VARCHAR(45) ); CREATE TABLE Tag ( TagID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, Tag VARCHAR(45), isGenre TINYINT DEFAULT 0 ); CREATE TABLE Platform ( PlatformID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, Manufacturer VARCHAR(45), Platform VARCHAR(45) ); CREATE TABLE Game ( GameID BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, Game VARCHAR(45) NOT NULL, GameTagID INT UNSIGNED, GamePlatformID INT UNSIGNED, ReleaseDate DATE, DeveloperID INT UNSIGNED, PublisherID INT UNSIGNED, Comments mediumtext, Thumbnail BLOB, Backsplash BLOB, FOREIGN KEY (DeveloperID) REFERENCES Developer(DeveloperID), FOREIGN KEY (PublisherID) REFERENCES Publisher(PublisherID) ); CREATE TABLE GameTag ( GameTagID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, GameID BIGINT UNSIGNED, TagID INT UNSIGNED, FOREIGN KEY (GameID) REFERENCES Game(GameID), FOREIGN KEY (TagID) REFERENCES Tag(TagID) ); CREATE TABLE GamePlatform ( GamePlatformID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, GameID BIGINT UNSIGNED, PlatformID INT UNSIGNED, FOREIGN KEY (GameID) REFERENCES Game(GameID), FOREIGN KEY (PlatformID) REFERENCES Platform(PlatformID) ); And I attached my EER diagram, but I'm actually having a problem getting the foreign key constraints to work as-is so none of the relationships are visible but here they are as they exist in my mind: Game to Tag - M:N Game to Platform - M:N Developer to Game - 1:M Publisher to Game - 1:M And I have a DLC table that I haven't quite figured out what to do with yet. That can come later. I'm using MySQL and again, hoping to get a little feedback on the layout of things. I appreciate any advice or suggestions anyone can offer. Any questions just ask. Thanks, Jay
  22. How to add multiple images within a modal

    Thank you so much. I am really learning a lot. I am actually not using Bootstrap, I am using notepadd++. It is the only way I know how. Does that make a difference to the coding you gave me? I did try it but it didn't work. This is what happened. Sorry for taking up so much of your time, but I really do appreciate all your help. It basically removed my slide show at the top and then the drop down menu that is now down without even hovering over it.
  23. How to add multiple images within a modal

    This is what it should be or similar to <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" id="viewport" content="target-densitydpi=high-dpi,initial-scale=1.0" /> <title>Document Title</title> <link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script type="text/javascript"> </script> <style type="text/css"> </style> </head> <body> <div class="container text-center"> <h1> Click Me </h1> <!-- Large modal --> <button class="btn btn-default" data-toggle="modal" data-target=".bs-example-modal-lg">Large modal</button> <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" style="display: none;"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Wrapper for slides --> <div class="carousel-inner"> <div class="item active"> <img class="img-responsive" src="http://placehold.it/1200x600/555/000&amp;text=One" alt="..."> <div class="carousel-caption"> One Image </div> </div> <div class="item"> <img class="img-responsive" src="http://placehold.it/1200x600/fffccc/000&amp;text=Two" alt="..."> <div class="carousel-caption"> Another Image </div> </div> <div class="item"> <img class="img-responsive" src="http://placehold.it/1200x600/fcf00c/000&amp;text=Three" alt="..."> <div class="carousel-caption"> Another Image </div> </div> </div> <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right"></span> </a> </div> </div> </div> </div> </div> </body> </html> You maybe using different version of bootstrap, jquery and obviously the images are different. CSS styling goes between <head>...</head> (unless placed inline to element themselves. JavaScript can go in with css in <head> or within body element, but any element, element class or id, must exist before JavaScript references them. That is why it is norm to place JS LINKS at bottom of page before </body>, so as page is read from top to bottom, the html with id and classes are rendered first, and JavaScript loaded last can reference them with no problems, plus it helps renders the whole page quicker.
  24. How to add multiple images within a modal

    I did yes. But I have no idea where to add that in or where to put it. That is a bit above my skill level. I have tried to just put it at the bottom of the code (obviously didn't work) and to look for a css tag in the code itself but couldn't find anything. I managed to then locate a css at the bottom of the page underneath the footer of what I assume is the original code of the site and then tried to put it in there but it also didn't work. No sure if I even did it right to begin with.
  25. Need Two Slideshows — Both with Arrow and Dots

    THANK YOU!! - this is EXACTLY what I needed!! I am still learning, I know that I have a long way to go. I am VERY appreciative of your time and expertise. ~bex
  26. Localhost

    btw i dont mean from the same netweork.. i mean like i wanna show the site im working on to my friend who is far away..
  27. Localhost

    i google "whats my ip4v aderss" so i get the actual ip adress
  1. Load more activity
×