PHP Classes

File: xcop.php

Recommend this page to a friend!
  Classes of Damir   PHP Even Swaps   xcop.php   Download  
File: xcop.php
Role: Example script
Content type: text/plain
Description: Generating of solutions
Class: PHP Even Swaps
Implement decision methods using Even Swaps
Author: By
Last change: new version
Date: 9 years ago
Size: 9,311 bytes
 

Contents

Class file image Download
<?php
session_start
();
error_reporting(0);
date_default_timezone_set('Europe/Zagreb');
require_once(
'instfile.php');



$jk= new DB();

     
$sel="Select ime,id from atribut where prid='".escapee($_GET['dod7dzdudhddd444'])."' ";
 
$skir=$jk->DBquery($sel);
      if (!
$skir){

      exit(
4);
      }
 
$drop1=$jk->DBres2arrN($skir);
  

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<title>Even Swaps</title>
<link href="stilovi.css" rel="stylesheet" type="text/css">
<script src="RICO/src/prototype.js" type="text/javascript"></script>
<script src="RICO/src/rico.js" type="text/javascript"></script>
<script src="RICO/src/ricoAjaxEngine.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {margin:0px; padding:0px; background-color:transparent; height: 100%;color: black}
.tddd{ border-bottom:0px; width:auto;margin:0px; padding-bottom:3px; padding-top:4px;}
.kdod{padding:0px; border-right:3px solid black; background-color:transparent; text-align:center; font-size:14px; font-weight:bold;text-transform: uppercase;}
td {padding:0px; border:0px; background-color:transparent; text-align:center; font-size:14px; font-weight:bold;}
.tbl{ border:0px; height:auto;padding:0px; margin-top:5px;margin-left:5px;margin-bottom:22px;}
.txshd{color: white;text-shadow: 2px 2px 4px #000000;}
.cop{padding:5px; text-align:left; border:1px Solid Gray; color:White; font-family:verdana; font-size:13px;}
.impresije{ border:0px; color:White; display:block; padding:0px; margin:0px; width:100%; height:100%; display:block;}
.copyras{ text-align:center; font-family:courier; font-size:9px; }
.dodDodDop2{ width:280px;
margin-bottom:3px;
margin-top:13px;
  border:1px inset #DCDCDC;
  border-radius: 20px;
  padding: 5px 8px;
  color: #333;
   text-shadow: 0px 2px 4px rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 2px 0 rgba(0,0,0,.2),
    0 0 4px rgba(0,0,0,0.1);}

input[type=submit]:hover, input[type="button"]:hover{
    border: 1px solid #999;color:#000;
}
input[type="submit"], input[type="button"] {background: #398525; /* old browsers */
background: -moz-linear-gradient(top, #8DD297 0%, #398525 100%); /* firefox */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#8DD297), color-stop(100%,#398525)); /* webkit */
display: block; width: 150px; height: 30px; padding: 0px; margin: 0 auto;
box-shadow: inset 0px 0px 6px #fff;
-webkit-box-shadow: inset 0px 0px 6px #fff;
border: 1px solid #5ea617;
border-radius: 10px;
font-size:12px;
vertical-align:middle; }
#evome
{
 
  background-color: #F07575; /* fallback color if gradients are not supported */
  background-image: -webkit-linear-gradient(top, hsl(0, 80%, 70%), #bada55); /* For Chrome 25 and Safari 6, iOS 6.1, Android 4.3 */
  background-image: -moz-linear-gradient(top, hsl(0, 80%, 70%), #bada55); /* For Firefox (3.6 to 15) */
  background-image: -o-linear-gradient(top, hsl(0, 80%, 70%), #bada55); /* For old Opera (11.1 to 12.0) */
  background-image: linear-gradient(to bottom, hsl(0, 80%, 70%), #bada55); /* Standard syntax; must be last */


border:1px inset #DCDCDC;border-radius:20px;padding: 5px 8px;color: #333;
  box-shadow:
    inset 0 2px 0 rgba(0,0,0,.2),
    0 0 4px rgba(0,0,0,0.1);

display:block;
text-align:center; font-weight:bold; cursor:pointer;
position:relative; margin-left:15px;margin-right:15px; vertical-align:middle;
}
#grad
{
background: -webkit-linear-gradient(left,Gray ,AliceBlue ); /*Safari 5.1-6*/
background: -o-linear-gradient(right,Gray ,AliceBlue ); /*Opera 11.1-12*/
background: -moz-linear-gradient(right,Gray ,AliceBlue ); /*Fx 3.6-15*/
background: linear-gradient(to right, Gray , AliceBlue ); /*Standard*/

border:1px inset #DCDCDC;border-radius:20px;padding: 5px 8px;color: #333;
  box-shadow:
    inset 0 2px 0 rgba(0,0,0,.2),
    0 0 4px rgba(0,0,0,0.1);

height:22px; width:182px; display:inline;
text-align:center; font-weight:bold; cursor:pointer;
position:relative; margin-left:15px;margin-right:15px; vertical-align:middle;
}
#grad:hover
{
background: -webkit-linear-gradient(left,AliceBlue,Gray); /*Safari 5.1-6*/
background: -o-linear-gradient(right,AliceBlue,Gray); /*Opera 11.1-12*/
background: -moz-linear-gradient(right,AliceBlue,Gray); /*Fx 3.6-15*/
background: linear-gradient(to right, AliceBlue, Gray); /*Standard*/

border:1px inset #DCDCDC;border-radius:20px;padding: 5px 8px;color: #333;
  box-shadow:
    inset 0 2px 0 rgba(0,0,0,.2),
    0 0 4px rgba(0,0,0,0.1);
}
#dolje {
width: 95%;
clear: left; bottom:0; /* stick to bottom */
padding-top: 6px;
margin-top:15px;
    margin-left: auto;
    margin-right: auto;
border:1px outset #DCDCDC;border-radius:30px;padding: 5px 8px;color: #333;
min-height:200px;
    background: -webkit-linear-gradient(white, WhiteSmoke ); /* For Safari 5.1 to 6.0 */
    background: -o-linear-gradient(white, WhiteSmoke ); /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(white, WhiteSmoke ); /* For Firefox 3.6 to 15 */
    background: linear-gradient(white, WhiteSmoke ); /* Standard syntax (must be last) */
}
#gore{
width: 95%;
text-align: left;
    height:auto !important; /* real browsers */
    min-width: 0px;
    display: table;
clear: right;
padding-top: 6px;
margin-top:15px;
vertical-align:middle;
    margin-left: auto;
    margin-right: auto;
    border:1px inset #DCDCDC;border-radius:30px;padding: 5px 8px;color: #333;
    background: -webkit-linear-gradient(WhiteSmoke,white ); /* For Safari 5.1 to 6.0 */
    background: -o-linear-gradient(WhiteSmoke,white ); /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(WhiteSmoke,white ); /* For Firefox 3.6 to 15 */
    background: linear-gradient(WhiteSmoke,white ); /* Standard syntax (must be last) */
}
 -->
 </style>

 <script type="text/javascript">
var tttt=1;
 
function NUzzz(ww,tt){

 

var tb=document.getElementById('h8076jkbcvcx');
var qpqp=document.getElementById('aoaoaopp');

var redbr = tb.rows.length;

var red = tb.insertRow(redbr);
console.log("solvar:"+redbr);


  <?
for($i=0;$i<count($drop1)+1;$i++)echo"var td".$i."= red.insertCell(".$i.");";
?>


  <?
for($i=0;$i<count($drop1)+1;$i++)echo"td".$i.".setAttribute('class', 'tddd');";
?>

var el1a = document.createElement("input");
            el1a.type = "text";
            el1a.setAttribute('name', 'imesolucije[]');
            el1a.setAttribute('class', 'dodDodDop2');
            el1a.setAttribute("required", "");
            td0.appendChild(el1a);


 
  <?
for($i=0;$i<count($drop1);$i++)echo"
var el1"
.$i." = document.createElement(\"input\");
            el1"
.$i.".type = \"text\";
            el1"
.$i.".setAttribute('name', 'SolIme".$i."[]');
            el1"
.$i.".setAttribute('class', 'dodDodDop2');
            el1"
.$i.".setAttribute(\"required\", \"\");
            td"
.($i+1).".appendChild(el1".$i.");";
?>

 tttt++;
qpqp.value=tttt;
    }
 
                   
 </script>
</head >

<body >
<div class="MainContent">

<div id="gore">
<form action="qqLp98.php" method="post" id="formica" accept-charset="utf-8">
<input type="hidden" name="UkInummmmI" id="aoaoaopp" value="1">
    <div style="float:left; margin-top:15px;padding-bottom:35px; padding-left:16px; font-size:24px;clear:both; font-weight:bolder; display:block;">Generating of solutions :<br>
   <?
for($i=0;$i<count($drop1);$i++)echo"<input type=\"hidden\" name= \"SSolIme".$i."\" value=\"".$drop1[$i][1]."\">";
echo
"<input type=\"hidden\" name= \"InummmmI\" value=\"".$i."\">";
 
?>
 <table align="left" cellSpacing="0" cellPadding="0" id="h8076jkbcvcx" class="tbl" border="0" style="background:transparent;width:auto;padding:0px; margin-left:5px;">
  <tr>
  <td class="kdod" style="font-size:20px; border-right:3px solid black;">Solution name</td>
  <?
for($i=0;$i<count($drop1);$i++)echo" <td class=\"kdod\">".$drop1[$i][0]."</td>";
?>
</tr>
 <tr>
 <td class="tddd">
 <input class="dodDodDop2" type="text" size="50" name="imesolucije[]" required>
 </td>
  <?
for($i=0;$i<count($drop1);$i++)echo"<td class=\"tddd\"><input class=\"dodDodDop2\" type=\"text\" size=\"50\" name= \"SolIme".$i."[]\" required></td>";
 
?>
</tr> </table>


</div>



<div id="dolje">

  <div style="margin-top:82px;display:block;clear: both;margin-left:48px;" id="dodDSSwwS_2_w">
  <input type="button" value="New entry" OnClick="NUzzz('dodDod');" ><input type="button" OnClick="document.forms.formica.submit();" style="margin-left:55px;" value="Submit" > </div>
 </form>

</div>
 
    <div class="copyras" align="center" >Even Swaps - 2015. </div>
    <br>

</div>
</body>
</html>