Jump to content

rockindano30

Members
  • Posts

    141
  • Joined

  • Last visited

    Never

Posts posted by rockindano30

  1. this is how i solved it using js.

     

    <html>
    <head>
    <title>Embed Media Player</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type"text/javascript">
    function PlayMedia(clipName){
    document.getElementById("player").innerHTML='<object id="mediaPlayer" width="265" height="190" '
          +'classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" '
          +'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" '
          +'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">'
          +'<param name="fileName" value="'+clipName+'">'
          +'<param name="autoStart" value="true">'
          +'<param name="showControls" value="true">'
          +'<param name="ShowStatusBar" value="1">'
          +'<param name="loop" value="false">'
          +'<embed type="application/x-mplayer2" '
          +'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" '
          +'showcontrols="true" width="265" height="190" '
          +'src="'+clipName+'" autostart="true" loop="false">'
          +'</embed>'
         +'</object>'
    }
    </script>
    <style type="text/css">
    <!--
    #playerframe {
    width: 268px;
    position: relative;
    padding: 5px;
    }
    #playerframe ul {
    background-color: #590002;
    padding: 0px;
    }
    #playerframe a {
    line-height: 35px;
    text-decoration: none;
    display: block;
    color: #CCCCCC;
    padding: 5px;
    }
    #playerframe a:hover {
    background-color: #800003;
    border: 1px solid #CCCCCC;
    }
    #playerframe li {
    list-style-type: none;
    display: block;
    }
    -->
    </style>
    <script src="Scripts/AC_ActiveX.js" type="text/javascript"></script>
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    </head>
    <body>
    <div id="playerframe">
    <div id="player">
      <script type="text/javascript">
    AC_AX_RunContent( 'id','mediaPlayer','codebase','http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701','type','application/x-oleobject','width','265','height','190','standby','Loading Microsoft Windows Media Player components...','classid','CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95','pluginspage','http://microsoft.com/windows/mediaplayer/en/download/','showcontrols','true','src','','autostart','true','loop','false','filename','','showstatusbar','1' ); //end AC code
    </script><noscript><object id="mediaPlayer"
                      codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
                      type="application/x-oleobject"
                      width=265
                      height="190" 
                      standby="Loading Microsoft Windows Media Player components..." 
                      classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95>
        <PARAM NAME="fileName" VALUE="" />
        <PARAM NAME="autoStart" VALUE="true" />
        <PARAM NAME="showControls" VALUE="true" />
        <PARAM NAME="ShowStatusBar" VALUE="1" />
        <PARAM NAME="loop" VALUE="false" />
        <embed
                      	type="application/x-mplayer2"         
                        pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" 
                        showcontrols="true" 
                        width="265" 
                      	height="190"
                      	src="" autostart="true" 
                      	loop="false">
      </embed></object></noscript>
    </div>
    <ul>
      <li><a href="http://link.to.your.clip.here.mpg" onClick="PlayMedia(this.href);return false">Video one </a></li>
      <li><a href="http://link.to.different.clip.here.mpg" onClick="PlayMedia(this.href);return false">Video Two</a></li>
      <li><a href="http://link.to.different.clip.here.mpg" onClick="PlayMedia(this.href);return false">Video Three</a></li>
    </ul>
    </div>
    </body>
    </html>
    

  2. hello all,

     

    well i have a webserver that i'm working on. now for all my websites i used apache/php/mysql. my question is how do i host three or multiple website in my server using apache as a server with php/mysql? no i have to set it up in the config file for apache if so how would i go about that?

  3. Hi everyone,

     

    i am working on a app. for a client. now i have my login.php page with a simple form. this page calls my validation2.php page and then validation2 page calls my update page.

     

    now when i type in the user name and password, my validation page displays my error that i have:

     

    "invalid username and password. login first"

     

    but if i hit go back on my browser and refresh the page and retype the info, it logs me in. i typed my info in correctly. but seems that the first time that i run it it doesn't finds anything in the mysql table users, so when i go back and refresh and retype it finds it in the table and continues with the update form.??? ??? ???

     

    i will be including my files here:

     

    login.php

      <form method="post" action="validate2.php">
        User Name:<Br />
          <input name="user_name" type="text" value=" " size="15" maxlength="25" /><br /><br />
          Password:<br />
      <input name="psswrd" type="password" value="" size="15" maxlength="25" /><br /><br />
          <input name="submit" type="submit" value="Login" />
    </form>
    

     

    validate2.php

    			<?php 
    			if(!isset($_POST["user_name"]) || !isset($_POST["psswrd"]))
    			die("invalid operation");
    			$goback = "<br /><br />Please <a href=\"login.php\">go back</a> and try again.";
    
    			//print "$_POST[\"user_name\"]<br />";
    			if(empty($_POST["user_name"])) die("<br />The email field cannot be left blank.");
    			if(empty($_POST["psswrd"])) die("<br />The Password field cannot be left blank");
    			$user_name = $_POST["user_name"];
    			$psswrd = md5(trim($_POST["psswrd"]));
    
    			if (!($db = mysql_connect('localhost','user_db','db_password')))
    			{
    				print"Error: could not connect to the database.";
    				exit;
    			}
    			mysql_select_db(test);
    
    //$query = "SELECT * FROM users WHERE user_name='{$_POST['user_name']}' AND psswrd='{$_POST['psswrd']}'";
    			$query = "SELECT * FROM users WHERE user_name = '{$user_name}' AND psswrd = '{$psswrd}'";
    			$result = mysql_query($query);
    
    			if(mysql_num_rows($result)==0)
    			die("<br />Invalid email or passwordmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm!<br />{$goback}");
    
    			$row = @ mysql_fetch_array($result);
    			session_start();
    			$_SESSION["user_id"]=$row["user_id"];
    			$_SESSION["ip_addr"]=$_SERVER["REMOTE_ADDR"];
    			$_SESSION["user_name"]=$row["user_name"];
    			header("LOCATION: update.php");
    		?>
    

×
×
  • 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.