Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Multimedija skript

[es] :: PHP :: Multimedija skript

[ Pregleda: 1327 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

chaki1976
chaki cardak
Vienna

Član broj: 61044
Poruke: 13
*.dynamic.xdsl-line.inode.at.



Profil

icon Multimedija skript28.11.2005. u 17:16 - pre 224 meseci
Hm imam jednu super skriptu za puštanje audio i video fajlova.
Skripta radi super ako su fajlovi na istom serveru gdje je i skript, e sad ja sam htio da mi pusta fajlove sa drugi servera? znam da je moguće ali ne znam kako?
znam da u 3 fajla moram unjet link od servera i tu dolazi do greške.
Evo kratak isječak iz ta 2 php fajla.

media_main_menu_music.php [B]ORIGINAL[/B]
Code:
$text .="<option value=\"none\">..::".$locale['MED_008']."::..</option>\n";
while($data = dbarray($result))    {
$text .="<option value=\"music/".$data['media_file']."\">".$data['media_name']."</option>\n";
}

$text .="</select><br><br>\n";
$text .="<span id=\"music1\"><embed type=\"application/x-mplayer2\" id=\"music1\"\n";
$text .="pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\"

media_main_menu_music.php [B]PREPRAVLJEN[/B]
Code:
$text .="<option value=\"none\">..::".$locale['MED_008']."::..</option>\n";
while($data = dbarray($result))    {
$text .="<option value=\"http://www.novalive.com/cardik/multimedia/muzika/".$data['media_file']."\">".$data['media_name']."</option>\n";
}

$text .="</select><br><br>\n";
$text .="<span id=\"music1\"><embed type=\"application/x-mplayer2\" id=\"music1\"\n";
$text .="pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\"

include_function.php [B]ORIGINAL[/B]
Code:
<?php
define("MEDIA_VIDEO", INFUSIONS."media_menu_panel/video/");
define("MEDIA_MUSIC", INFUSIONS."media_menu_panel/music/");


include_function.php [B]PREPRAVLJEN[/B]
Code:
<?php
define("MEDIA_VIDEO", INFUSIONS."http://www.novalive.com/cardik/multimedia/video/");
define("MEDIA_MUSIC", INFUSIONS."http://www.novalive.com/cardik/multimedia/muzika/");

Postoji i 3 fajl isti kao media_main_menu_music.php samo se radi o video
E sve je to super ali kad ocu da preko menija postavim fajl tamo gdje mi normalno dođe lista od fajlova koje sam prethodno uplodo preko ftp-a pojavi se sljedeća greška:
----Warning:Opendir(../../../
ja mislim da je problem u linkovima koje sam ubacio da ima previše slešova, pokušao sam i bez www i bez http i svakako ali uvijek ista greška.
Pa ako netko zna kako se piše pravi link u php-u ili ako je greška negdje drugo?????
Sve je moje tvoje
 
Odgovor na temu

Nemanja Avramović
Engineering Manager
MENU Technologies
Beograd, Srbija

Moderator
Član broj: 32202
Poruke: 4391
*.internet.krstarica.net.

Sajt: https://avramovic.info


+46 Profil

icon Re: Multimedija skript28.11.2005. u 20:21 - pre 224 meseci
koja je to skripta, daj celu pa da analiziramo :)
Laravel Srbija.

[NE PRUŽAM PODRŠKU ZA PHP PREKO PRIVATNIH PORUKA!]
 
Odgovor na temu

chaki1976
chaki cardak
Vienna

Član broj: 61044
Poruke: 13
*.dynamic.xdsl-line.inode.at.



Profil

icon Re: Multimedija skript28.11.2005. u 23:52 - pre 224 meseci
Ma to je jedan čitav sistem nesto kao php nuke: e ovaj skript je samo jedan modul dodatni, i ja sam pito tamo da li je moguće da linkam fajlove sa drugog servera tip nije baš neko tko hoće pomoć ali mi je reko da može da i kod njega uzima mp3 sa drugog servera i poslo mi ta 3 php fajla sa linkovima samo što ja dobijem onu grešku.
nije mi htio dalje pomoć reko je da se malo gogglam, ali reko je da je grška u slešovima u linku kao da u php-u negdje ide ovako: "\http:mojadomena.com\adio/"
a negdje opet ovako"http:www........... itd ja sam isprobo sve te verzije i neide,a uostalom evo code od svih fajlova pa pogledajte od originala:
media_menu_panel
media_menu_panel/media_main_menu_music.php.
media_menu_panel/media_main_menu_video.php.
media_menu_panel/media_menu_panel.php.
media_menu_panel/admin/admin_music.php.
media_menu_panel/admin/adminfooter.php.
media_menu_panel/admin/adminheader.php.
media_menu_panel/admin/media_menu_admin.php.
media_menu_panel/functions/include_function.php.
media_menu_panel/images/
media_menu_panel/music/
media_menu_panel/video/
media_menu_panel/locale/German.php



media_main_menu_music.php:
Code:
require_once "../../maincore.php";
require_once THEME."theme.php";

if (file_exists(INFUSIONS."media_menu_panel/locale/".$settings['locale'].".php")) {
    // Load the locale file matching the current site locale setting.
    include INFUSIONS."media_menu_panel/locale/".$settings['locale'].".php";
} else {
    // Load the infusion's default locale file.
    include INFUSIONS."media_menu_panel/locale/German.php";
}

echo "<link rel='stylesheet' href='".THEME."styles.css' type='text/css'><body bgcolor='$body_bg' text='$body_text'>";

$result = dbquery("SELECT * FROM ".$db_prefix."media_station WHERE Typ='M'");

opentable($locale['MED_007']);

$text ="<html>\n";
$text .="<head>\n";
$text .="<script type=\"text/javascript\"><!--\n";
$text .="function song(){\n";
$text .="document.getElementById('music1').innerHTML=\"<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='\"+document.getElementById('cancion').value+\"' name='MediaPlayer1' width='400' height='400' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true' Volume='-10'></embed>\";\n";
$text .="}\n";
$text .="//-->\n";
$text .="</script>\n";
$text .="</head>\n";
$text .="<body>\n";
$text .="<center>\n";
$text .="<select class=\"textbox\" id=\"cancion\" onchange=\"song()\" size=\"1\"> \n";

$text .="<option value=\"none\">..::".$locale['MED_008']."::..</option>\n";
while($data = dbarray($result))    {
$text .="<option value=\"music/".$data['media_file']."\">".$data['media_name']."</option>\n";
}

$text .="</select><br><br>\n";
$text .="<span id=\"music1\"><embed type=\"application/x-mplayer2\" id=\"music1\"\n";
$text .="pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" \n";
$text .="src=\"\" \n";
$text .="name=\"MediaPlayer1\" \n";
$text .="width=\"400\"\n";
$text .="height=\"400\"\n";
$text .="controltype=\"2\" \n";
$text .="showcontrols=\"1\"\n";
$text .="showstatusbar=\"1\"\n";
$text .="Volume=\"-10\"\n";
$text .="AutoStart=\"1\">\n";
$text .="</embed></span>\n";
$text .="</div>\n";
$text .="</center>\n";
$text .="</body>\n";
$text .="</html>\n";

echo $text;

closetable();
?>


media_main_menu_video.php:
Code:
<?php
require_once "../../maincore.php";
require_once THEME."theme.php";

if (file_exists(INFUSIONS."media_menu_panel/locale/".$settings['locale'].".php")) {
    // Load the locale file matching the current site locale setting.
    include INFUSIONS."media_menu_panel/locale/".$settings['locale'].".php";
} else {
    // Load the infusion's default locale file.
    include INFUSIONS."media_menu_panel/locale/German.php";
}

echo "<link rel='stylesheet' href='".THEME."styles.css' type='text/css'><body bgcolor='$body_bg' text='$body_text'>";

$result = dbquery("SELECT * FROM ".$db_prefix."media_station WHERE Typ='V'");

opentable($locale['MED_005']);

$text ="<html>\n";
$text .="<head>\n";
$text .="<script type=\"text/javascript\"><!--\n";
$text .="function song(){\n";
$text .="document.getElementById('music1').innerHTML=\"<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='\"+document.getElementById('cancion').value+\"' name='MediaPlayer1' width='400' height='400' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true' Volume='-10'></embed>\";\n";
$text .="}\n";
$text .="//-->\n";
$text .="</script>\n";
$text .="</head>\n";
$text .="<body>\n";
$text .="<center>\n";
$text .="<select class=\"textbox\" id=\"cancion\" onchange=\"song()\" size=\"1\"> \n";

$text .="<option value=\"none\">..::".$locale['MED_006']."::..</option>\n";
while($data = dbarray($result))    {
$text .="<option value=\"video/".$data['media_file']."\">".$data['media_name']."</option>\n";
}

$text .="</select><br><br>\n";
$text .="<span id=\"music1\"><embed type=\"application/x-mplayer2\" id=\"music1\"\n";
$text .="pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" \n";
$text .="src=\"\" \n";
$text .="name=\"MediaPlayer1\" \n";
$text .="width=\"400\"\n";
$text .="height=\"400\"\n";
$text .="controltype=\"2\" \n";
$text .="showcontrols=\"1\"\n";
$text .="showstatusbar=\"1\"\n";
$text .="Volume=\"-10\"\n";
$text .="AutoStart=\"1\">\n";
$text .="</embed></span>\n";
$text .="</div>\n";
$text .="</center>\n";
$text .="</body>\n";
$text .="</html>\n";

echo $text;

closetable();
?>


media_menu_panel.php:
Code:
<?php
if (file_exists(INFUSIONS."media_menu_panel/locale/".$settings['locale'].".php")) {
    // Load the locale file matching the current site locale setting.
    include INFUSIONS."media_menu_panel/locale/".$settings['locale'].".php";
} else {
    // Load the infusion's default locale file.
    include INFUSIONS."media_menu_panel/locale/German.php";
}

openside($locale['MED_001']);

echo "<SCRIPT LANGUAGE=\"JavaScript\">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval(\"page\" + id + \" = window.open(URL, '\" + id + \"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500');\");
}
</script>";

echo "<center>";
echo "<b><u>".$locale['MED_002']."</u></b><br><br>";
echo "<a href=\"javascript:popUp('".INFUSIONS."media_menu_panel/media_main_menu_music.php')\"><img src=\"".INFUSIONS."media_menu_panel/images/sound.png\" border=\"0\" title=".$locale['MED_004']."></a>&nbsp;";
echo "<a href=\"javascript:popUp('".INFUSIONS."media_menu_panel/media_main_menu_video.php')\"><img src=\"".INFUSIONS."media_menu_panel/images/video.png\" border=\"0\" title=".$locale['MED_003']."></a>";
echo "</center>";

closeside();
?>


Onda tu imam folder functions i u njemu fajl include_function.php:
Code:
<?php
define("MEDIA_VIDEO", INFUSIONS."media_menu_panel/video/");
define("MEDIA_MUSIC", INFUSIONS."media_menu_panel/music/");

function buildImageBox($name,$sel="")
    {
    echo '<SELECT class="textbox" NAME="'.$name.'" style="width:200px;">
    <option value="">-----';

    $handle=opendir(MEDIA_VIDEO);
        while (false!==($file = readdir($handle))) 
        {
        $filec = strrchr($file, '.');
            if ($filec == '.mpg'||$filec == '.mpeg'||$filec == '.avi'||$filec == '.wmv'||$filec == '.asf')
            {
                if($sel == $file)
                {
                    echo '<OPTION VALUE="'.$file.'" SELECTED>'.$file.'</OPTION>';
                }

                else
                {
                    echo '<OPTION VALUE="'.$file.'">'.$file.'</OPTION>';
                }

            }

        }

    closedir($handle);
    echo '</select>';
    }

function buildImageBox2($name,$sel="")
    {
    echo '<SELECT class="textbox" NAME="'.$name.'" style="width:200px;">
    <option value="">-----';

    $handle=opendir(MEDIA_MUSIC);
        while (false!==($file = readdir($handle))) 
        {
        $filec = strrchr($file, '.');
            if ($filec == '.mp3'||$filec == '.wav')
            {
                if($sel == $file)
                {
                    echo '<OPTION VALUE="'.$file.'" SELECTED>'.$file.'</OPTION>';
                }

                else
                {
                    echo '<OPTION VALUE="'.$file.'">'.$file.'</OPTION>';
                }

            }

        }

    closedir($handle);
    echo '</select>';
    }

?>

Onda folder admi i u njemu:admin_music.php i admin_video.php alo upisaću samo musik zato što je isti kao video:
Code:
<?php
include("adminheader.php");
include INFUSIONS."media_menu_panel/functions/include_function.php"; 

if ($step == "delete") {
            $result = dbquery("DELETE FROM ".$db_prefix."media_station WHERE Id='$music_id'");
          opentable($locale['MED_031']);
            echo "<center><br><b>".$locale['MED_032']."</b><br><br>
<img src='".THEME."images/bullet.gif'> <a href='media_menu_admin.php'>".$locale['MED_018']."</a> <img src='".THEME."images/bulletb.gif'><br><br>
<img src='".THEME."images/bullet.gif'> <a href='".ADMIN."index.php'>".$locale['MED_019']."</a> <img src='".THEME."images/bulletb.gif'><br><br>
</center>\n";
closetable();
        }

        if (isset($_POST['save_music'])) {
            $media_name = stripinput($media_name);
                                                        
            if ($step == "edit") {
                $result = dbquery("UPDATE ".$db_prefix."media_station SET media_name='$media_name', media_file='$_POST[media_file]' WHERE Id='$music_id'");
            } else {
                $result = dbquery("INSERT INTO ".$db_prefix."media_station VALUES('', 'M', '$media_name', '$_POST[media_file]')");
            }
            header("Location: admin_music.php");
        }
        if ($step == "edit") {
            $result = dbquery("SELECT * FROM ".$db_prefix."media_station WHERE Id='$music_id'");
            $data = dbarray($result);
            $media_name = $data['media_name'];
            $media_file = $data['media_file'];
                        
            $formaction = "$PHP_SELF?step=edit&music_id=".$data['Id'];
            opentable($locale['MED_033']);
        } else {
            $formaction = "$PHP_SELF";
            opentable($locale['MED_034']);
        }
        echo "<form name='addmusic' method='post' action='$formaction'>";

echo "<table align='center' width='400' cellspacing='0' cellpadding='0' class='tbl'>
<tr>
<td width='150'>".$locale['MED_035']."</td>
<td><input type='text' name='media_name' value='$media_name' class='textbox' style='width:200px;'></td>
</tr>
<tr>
<td width='150'>".$locale['MED_036']."</td>
<td>";buildImageBox2('media_file',''.$media_file.'');
echo "</td>
</tr>
<tr>
<td align='center' colspan='2'>
<br><input type='submit' name='save_music' value='".$locale['MED_024']."' class='button'></td>
</tr>
</table>
</form>";
closetable();
tablebreak();

opensidex($locale['MED_037'],"off");
        echo "<table align='center' width='500' cellspacing='1' cellpadding='0' class='tbl-border'>\n";
        $result = dbquery("SELECT * FROM ".$db_prefix."media_station WHERE Typ='M' ORDER BY media_name");
        if (dbrows($result) != 0) {
            echo "<tr>
<td class='tbl2'><b>".$locale['MED_038']."</b></td>
<td class='tbl2'><b>".$locale['MED_039']."</b></td>
<td width='60' class='tbl2'><b>".$locale['MED_030']."</b></td>
</tr>\n";
            while ($data = dbarray($result)) {
                echo "<tr>
<td class='tbl1'><a href='$PHP_SELF?step=edit&music_id=".$data['Id']."'>".$data['media_name']."</a></td>
<td class='tbl1'>".$data['media_file']."</td>
<td class='tbl1'><a href='$PHP_SELF?step=delete&music_id=".$data['Id']."'>".$locale['MED_028']."</a></td>
</tr>\n";
            }
            echo "</table>\n";
        } else {
            echo "<tr><td class='tbl1' align='center'><b>".$locale['MED_040']."</b></td></tr></table>\n";
        }
closesidex();
        
include ("adminfooter.php");
?>

u admin folderu ima još:(adminfooter.php) (adminheader.php) (media_menu_admin.php) ali mislim da oni nisu važni.
u mom prvom postu se vidi kako sam ja ubacio linkove, e sad šta tu nevalja ja nemam pojma.

Sve je moje tvoje
 
Odgovor na temu

_owl_

Član broj: 318
Poruke: 1043
*.vdial.verat.net.



+3 Profil

icon Re: Multimedija skript29.11.2005. u 00:13 - pre 224 meseci
Code:

<?php
define("MEDIA_VIDEO", INFUSIONS."media_menu_panel/video/");
define("MEDIA_MUSIC", INFUSIONS."media_menu_panel/music/");

Zar ne vidis da ti u generisanju putanja(linkova) ucestvuje i konstanta INFUSIONS (koja najverovatnije ukazije na putanju skripti u okviru serverovog fajlsistema) ???

Owl
 
Odgovor na temu

chaki1976
chaki cardak
Vienna

Član broj: 61044
Poruke: 13
*.dynamic.xdsl-line.inode.at.



Profil

icon Re: Multimedija skript29.11.2005. u 02:16 - pre 224 meseci
Vidim ali pošto sam php noob ne znam kako i šta uklonit ili dodat.
To mi je poslao taj momak kao navodno to tako kod njega radi što čisto sumnjam.
IFUSIJA ili Infusion to je jedan dio tog sistema znači u tom čitavom sistemu
ima i folder koji se zove infusion, e u taj folder se uplodaju sve extra skripte kao što je i ova media stacion i onda se preko admin menija instalira infusija dabi napravila novu tabelu u majskuluitd...

Sve je moje tvoje
 
Odgovor na temu

[es] :: PHP :: Multimedija skript

[ Pregleda: 1327 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.