Pouvez vous mieux expliquer
emre77130t
-
emre77130t -
emre77130t -
Bonjour,
voici mon code . vous pouvez me dire ou placer ces codes pour que sa fonctionne
merci davance
// based on ideea http://www.nofunc.com/AJAX_Star_Rating/
// Please if you integrate into HTML Templates, use this file as example
// You will need to copy all from below into your PHP file ...
// For example if you have picture.php, you will need to copy
// first part and second part of the file on proper place.
// You will need to know some PHP
// STEP 1 - copy from here to PHP file
include_once("config.inc.php");
include_once($RATE_PATH."cls_rate_ajax.php");
include_once($RATE_PATH."rate.common.php");
include_once("cls_fast_template.php");
include_once("$LANG.inc.php");
$ft = new FastTemplate($TEMPLATE_PATH);
$ft->define(array("main"=>"template_test_xajax.html"));
$file=$_SERVER["REQUEST_URI"];
// version control
if(empty($file))
{
global $HTTP_SERVER_VARS;
$file=$HTTP_SERVER_VARS['REQUEST_URI'];
}
$expl=array();
$expl=explode ("test_rate_ajax.php",$file);
$file= "test_rate_ajax.php".$expl[1];
$file_real=$file;
// specifiing the variables that should be used
// EXAMPLE:
// https://www.domain.com/errors/500.html
// will use as rating string "path/index.php"
// usually we need to rate articles by their id's (and other variables)
// in this case the $var_array should be set up
// if you have Artid then will be
// $var_array = array(0=>"Artid");
$var_array = array(0=>"id");
// in this case only https://www.domain.com/errors/500.html$from=12
// will be rated as "path/index.php?id=1" because the rest of the
// url variables are dumped
// Special case:
// if you want to rate only "path/index.php" but you have some url variables
// then you may leave the array blank
// remove the // from the begining of the next line
// $var_array = array();
$querystring=$_SERVER['QUERY_STRING'];
// version control
if(empty($querystring))
{
global $HTTP_SERVER_VARS;
$querystring=$HTTP_SERVER_VARS['QUERY_STRING'];;
}
parse_str($querystring, $variable_array);
// undoing the query string with the $var_array variables
$buffer="";
foreach(array_keys($variable_array) as $v)
if(in_array($v,$var_array))
{
$buffer.=$v;
$buffer.="=";
$buffer.=$variable_array[$v];
$buffer.="&";
}
$buffer=substr($buffer,0, -1);
$file = strtok($file,"?");
if(sizeof($var_array)>0)
{
$file.="?";
$file.=$buffer;
}
if($RATE_STAR_OPTION=="half")
$style=84;
else
$style=168;
$ft->assign("STYLE",$style);
$ft->assign("EXCELLENT",$excellent);
$ft->assign("GOOD",$good);
$ft->assign("FAIR",$fair);
$ft->assign("POOR",$poor);
$ft->assign("USELESS",$useless);
$ft->assign('XAJAX_SCRIPT', $xajax ->getJavascript($RATE_URL."xajax/"));
$rate=new Rating2("Rate",$file,$file_real);
$ft->assign("RATE",$rate->getRating());
$ft->assign("NYR",$rate->getNotYetRated());
$ft->parse("mainContent", "main");
$ft->FastPrint("mainContent");
?>
voici mon code . vous pouvez me dire ou placer ces codes pour que sa fonctionne
merci davance
// based on ideea http://www.nofunc.com/AJAX_Star_Rating/
// Please if you integrate into HTML Templates, use this file as example
// You will need to copy all from below into your PHP file ...
// For example if you have picture.php, you will need to copy
// first part and second part of the file on proper place.
// You will need to know some PHP
// STEP 1 - copy from here to PHP file
include_once("config.inc.php");
include_once($RATE_PATH."cls_rate_ajax.php");
include_once($RATE_PATH."rate.common.php");
include_once("cls_fast_template.php");
include_once("$LANG.inc.php");
$ft = new FastTemplate($TEMPLATE_PATH);
$ft->define(array("main"=>"template_test_xajax.html"));
$file=$_SERVER["REQUEST_URI"];
// version control
if(empty($file))
{
global $HTTP_SERVER_VARS;
$file=$HTTP_SERVER_VARS['REQUEST_URI'];
}
$expl=array();
$expl=explode ("test_rate_ajax.php",$file);
$file= "test_rate_ajax.php".$expl[1];
$file_real=$file;
// specifiing the variables that should be used
// EXAMPLE:
// https://www.domain.com/errors/500.html
// will use as rating string "path/index.php"
// usually we need to rate articles by their id's (and other variables)
// in this case the $var_array should be set up
// if you have Artid then will be
// $var_array = array(0=>"Artid");
$var_array = array(0=>"id");
// in this case only https://www.domain.com/errors/500.html$from=12
// will be rated as "path/index.php?id=1" because the rest of the
// url variables are dumped
// Special case:
// if you want to rate only "path/index.php" but you have some url variables
// then you may leave the array blank
// remove the // from the begining of the next line
// $var_array = array();
$querystring=$_SERVER['QUERY_STRING'];
// version control
if(empty($querystring))
{
global $HTTP_SERVER_VARS;
$querystring=$HTTP_SERVER_VARS['QUERY_STRING'];;
}
parse_str($querystring, $variable_array);
// undoing the query string with the $var_array variables
$buffer="";
foreach(array_keys($variable_array) as $v)
if(in_array($v,$var_array))
{
$buffer.=$v;
$buffer.="=";
$buffer.=$variable_array[$v];
$buffer.="&";
}
$buffer=substr($buffer,0, -1);
$file = strtok($file,"?");
if(sizeof($var_array)>0)
{
$file.="?";
$file.=$buffer;
}
if($RATE_STAR_OPTION=="half")
$style=84;
else
$style=168;
$ft->assign("STYLE",$style);
$ft->assign("EXCELLENT",$excellent);
$ft->assign("GOOD",$good);
$ft->assign("FAIR",$fair);
$ft->assign("POOR",$poor);
$ft->assign("USELESS",$useless);
$ft->assign('XAJAX_SCRIPT', $xajax ->getJavascript($RATE_URL."xajax/"));
$rate=new Rating2("Rate",$file,$file_real);
$ft->assign("RATE",$rate->getRating());
$ft->assign("NYR",$rate->getNotYetRated());
$ft->parse("mainContent", "main");
$ft->FastPrint("mainContent");
?>
A voir également:
- Pouvez vous mieux expliquer
- Chez elle, bérénice navigue sur le web avec sa tablette. soudain, la page d’erreur ci-dessous s’affiche dans son navigateur. sa sœur a le même problème sur son ordinateur portable connecté au même réseau que bérénice. plusieurs raisons peuvent expliquer le problème rencontré par bérénice, lesquelles ? - Forum Réseaux sociaux
- Bonjour pourriez vous m'expliquer le fonctionnement... D'allopass ? - Forum Réseaux sociaux
- Je n'arrive plus a naviguer !!! ✓ - Forum Virus
- Expliquer moi se que sait que noreply - Forum Mail
- SVP HELP ME TOUT EXPLIQUER DANS LE TOPIC - Forum Java