<?php
$modx->db->query("SELECT * FROM yourtablename");
?>
$simplevideoshow = null;
if (class_exists('simplevideoshow')) {
$simplevideoshow = new simplevideoshow($_video, $_parameter);
} else {
$output=$_lang['error'].__LINE__.") ".$filevalue." ".$_lang['invalid_class'];
return $output;
}
// ---------------------------------------------------------------------------------------------------------
$med_id = 1;
// Query's
// query - name, type and comment:
$result = $modx->db->query("SELECT media_name, comment FROM media WHERE media_id = '".$med_id."'");
if (!$result) {die('QueryErr: VideoShow.inc';}
$med_name = mysql_result($result, 0);
$med_comment = mysql_result($result, 1);
// Output
$output=$simplevideoshow->render();
$medhd="</font><table width='100%' cellspacing='0' cellpadding='0' border='1'>
<tr><td align='center'>";
$medft="</td></tr>
<tr><td width='100%'>
<table border='0' cellspacing='0' cellpadding='2' width='100%'>
<tr><td>
Comment:
</td><td>
$med_comment
</td></tr>
<tr><td>
Rating:
</td><td>
$med_name
</td></tr>
</table><br /><br />";
$output=$medhd.$output.$medft;
// ---------------------------------------------------------------------------------------------------------
// ---------------------------------------------------
// Output results
// ---------------------------------------------------
return $output;

<?php die('Unauthorized access.'); ?>a:37:{s:2:"id";s:1:"7";s:4:"type";s:8:"document";s:11:"contentType";s:9:"text/html";s:9:"pagetitle";s:5:"Clips";s:9:"longtitle";s:13:"Chaotic Clips";s:11:"description";s:0:"";s:5:"alias";s:0:"";s:9:"published";s:1:"1";s:8:"pub_date";s:1:"0";s:10:"unpub_date";s:1:"0";s:6:"parent";s:1:"0";s:8:"isfolder";s:1:"1";s:9:"introtext";s:0:"";s:7:"content";s:180:"<font size="5"> <span style="font-weight: bold;">The Clips!</span></font>
<br /><br /><font color='white'>
[!SimpleVideoShow? &video=`test.wmv` &enableJavaScript=`true`!]";s:8:"richtext";s:1:"1";s:8:"template";s:1:"6";s:9:"menuindex";s:1:"3";s:10:"searchable";s:1:"1";s:9:"cacheable";s:1:"1";s:9:"createdby";s:1:"1";s:9:"createdon";s:10:"1164102166";s:8:"editedby";s:1:"1";s:8:"editedon";s:10:"1164900153";s:7:"deleted";s:1:"0";s:9:"deletedon";s:1:"0";s:9:"deletedby";s:1:"0";s:11:"publishedon";s:10:"1164118592";s:11:"publishedby";s:1:"1";s:9:"menutitle";s:5:"Clips";s:7:"donthit";s:1:"0";s:11:"haskeywords";s:1:"0";s:11:"hasmetatags";s:1:"0";s:10:"privateweb";s:1:"0";s:10:"privatemgr";s:1:"0";s:13:"content_dispo";s:1:"0";s:8:"hidemenu";s:1:"0";s:17:"__MODxDocGroups__";s:0:"";}<!--__MODxCacheSpliter__--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head> (....)
<font size="5"> <span style="font-weight: bold;">The Clips!</span></font> <br /><br /><font color='white'> [!SimpleVideoShow? &video=`test.wmv` &enableJavaScript=`true`!]
$snipPath = $modx->config['base_path'] . 'assets/snippets/simplevideoshow/';
$snip = $snipPath.'simplevideoshow.inc.php';
if (isset($file)) {
$file = $file;
} else {
$file = $snip;
}
$include = include($file);
return $include;global $modx;
// ---------------------------------------------------
// Get Language
// ---------------------------------------------------
$language = (isset($language))? $language : "english";
// ---------------------------------------------------
// Include files
// ---------------------------------------------------
$files['language'] = $snipPath."lang/$language.inc.php";
$files['functions'] = $snipPath."simplevideoshow.class.php";
foreach ($files as $filename => $filevalue) {
if (file_exists($filevalue) && $filename != "language") {
include_once($filevalue);
} else if(file_exists($filevalue) && $filename == "language") {
include($filevalue);
$GLOBALS['_lang'] = $_lang;
} else if($filename == "language") {
$output="Language file does not exist Please check: ".$filevalue;
return $output;
} else {
$output=$_lang['error'].__LINE__.") ".$filevalue." ".$_lang['file_does_not_exist'];
return $output;
}
}
// ---------------------------------------------------
// Parameters
// ---------------------------------------------------
$video = isset($video) ? $video: $_lang['error'].__LINE__.") ".$_lang['no_video'];
$videoPath = isset($videoPath) ? $videoPath : "assets/media/";
if (!file_exists( $modx->config['base_path'] . $videoPath.$video)){
$output=$_lang['error'].__LINE__.") ". $modx->config['base_path'] . $videoPath.$video." ".$_lang['file_does_not_exist']."<br />";
return $output;
}
$_video['video']=$modx->config['site_url'].$videoPath.$video;
$_video['width'] = isset($width) ? $width: "400";
$_video['height'] = isset($height) ? $height: "340";
$_video['standby'] = isset($standby) ? $standby: $_lang['standby'];
$_parameter['showcontrols'] = isset($showcontrols) ? $showcontrols: "true";
$_parameter['autostart'] = isset($autostart) ? $autostart: "true";
$_parameter['controller'] = isset($controller) ? $controller: "true";
$_parameter['showstatusbar'] = isset($showstatusbar) ? $showstatusbar: "default";
$_parameter['volume'] = isset($volume) ? $volume: "75%";
$_parameter['animationatstart'] = isset($animationatstart) ? $animationatstart: "default";
$_parameter['transparentatstart'] = isset($transparentatstart) ? $transparentatstart: "true"; //modifié
$_parameter['qtsrcdontusebrowser'] = isset($qtsrcdontusebrowser) ? $qtsrcdontusebrowser: "default";
$_parameter['enablejavascript'] = isset($enablejavascript) ? $enablejavascript: "default";
$_parameter['clicktoplay'] = isset($enablejavascript) ? $enablejavascript: "default";
$_parameter['stretchToFit'] = isset($stretchToFit) ? $stretchToFit: "true";
$_parameter['AutoSize'] = isset($stretchToFit) ? $stretchToFit: "true";
// ---------------------------------------------------
// Begin the traitement
// --------------------------------------------------
$simplevideoshow = null;
if (class_exists('simplevideoshow')) {
$simplevideoshow = new simplevideoshow($_video, $_parameter);
} else {
$output=$_lang['error'].__LINE__.") ".$filevalue." ".$_lang['invalid_class'];
return $output;
}
// ---------------------------------------------------------------------------------------------------------
$med_id = 1;
// Query's
// query - name, type and comment:
$result = $modx->db->query("SELECT media_name, comment FROM media WHERE media_id = '".$med_id."'");
if (!$result) {die('QueryErr: VideoShow.inc';}
while ($val = mysql_fetch_array($result, MYSQL_NUM))
{
$med_name = $val[0];
$med_comment = $val[1];
}
// Output
$output=$simplevideoshow->render();
$medhd="</font><table width='100%' cellspacing='0' cellpadding='0' border='1'>
<tr><td align='center'>";
$medft="</td></tr>
<tr><td width='100%'>
<table border='0' cellspacing='0' cellpadding='2' width='100%'>
<tr><td>
Comment:
</td><td>
$med_comment
</td></tr>
<tr><td>
Rating:
</td><td>
$med_name
</td></tr>
</table><br /><br />";
$output=$medhd.$output.$medft;
// ---------------------------------------------------------------------------------------------------------
// ---------------------------------------------------
// Output results
// ---------------------------------------------------
return $output;$include = include($file); return $include;
include($file); // this no longer has a return, but simply creates a variable $output return $output;
if (!$result) {die('QueryErr: VideoShow.inc';}if (!$result) {die('QueryErr: VideoShow.inc');}