Example #1
0
function doEdit()
{
    if (isset($_POST['submit'])) {
        $COMPETENCEID = $_POST['competenceId'];
        $COMPETENCENAME = $_POST['competencename'];
        $DESCRIPTION = $_POST['description'];
        $SECTOR = $_POST['sector'];
        $DOMAIN = $_POST['domain'];
        //$SUBJECT=$_POST['subject'];
        $competence = new Competence();
        $competence->name = $COMPETENCENAME;
        $competence->description = $DESCRIPTION;
        $competence->sector_id = $SECTOR;
        $competence->domain_id = $DOMAIN;
        $competence->subject_id = $DOMAIN;
    }
    if ($COMPETENCEID == "") {
        message('ID Number is required!', "error");
        redirect('index.php?view=edit&id=' . $COMPETENCEID);
    } elseif ($COMPETENCENAME == "") {
        message('School Name is required!', "error");
        redirect('index.php?view=edit&id=' . $COMPETENCEID);
    } elseif ($DESCRIPTION == "") {
        message('Short Name is required!', "error");
        redirect('index.php?view=edit&id=' . $COMPETENCEID);
    } elseif ($SECTOR == "") {
        message('Address is required!', "error");
        redirect('index.php?view=edit&id=' . $COMPETENCEID);
    } elseif ($DOMAIN == "") {
        message('Extension is required!', "error");
        redirect('index.php?view=edit&id=' . $COMPETENCEID);
    } else {
        $competence->update($_GET['id']);
        message('School information updated successfully!', "info");
        redirect('index.php');
    }
}
Example #2
0
<?php 
$competence = new Competence();
$list = $competence->single_competence($_GET['competenceId']);
?>
<form class="form-horizontal well span9" action="controller.php?action=edit&id=<?php 
echo $list->competence_id;
?>
" method="POST">
	
	<fieldset>
		<legend>Competence Information</legend>
		
		
		<div class="form-group" id="competence_id">
			<div class="col-md-8">
				<label class="col-md-4 control-label" for="competence_id">Competence Number </label>
				
				<div class="col-md-8">
					<input class="form-control input-sm" id="competence_id" name="competence_id" type="text" value="<?php 
echo $list->competence_id;
?>
" readonly>
				</div>
				
			</div>
			
		</div>
		
		<div class="form-group">
			<div class="rows">
Example #3
0
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            $aventurier->modifier();
            $magies = Magie::Lister();
            $dieux = Dieu::Lister();
            include "view/ficheRapideModification.php";
        } else {
            $message = "vous n&apos;avez pas le bon code d&apos;accès.";
            include "view/message.php";
        }
    }
} else {
    $armes = Arme::ListerBase();
    $equipements = Equipement::ListerBase();
    $protections = Protection::ListerBase();
    $types_arme = Arme::ListerTypesArmeDeBase();
    $types_protection = Protection::ListerTypesProtectionDeBase();
    $types_equipement = Equipement::ListerTypesEquipementDeBase();
    $metiers = Metier::Lister();
    $origines = Origine::Lister();
    $competences = Competence::Lister();
    $magies = Magie::Lister();
    $dieux = Dieu::Lister();
    include "view/ficheRapide.php";
}
    public function ficheMJ()
    {
        $aventurier = $this;
        ?>
        <style>
        td
        {
            padding:5px;
        }
    </style>
    <table style='margin:10px;border-collapse:collapse;background-image:url("image/bg3.png");border: 2px #900000 solid;'>
    <tr><td style='border-bottom:1px #900000 solid;text-align:center;'><?php 
        echo $aventurier->NOM . " <span style='font-size:70%;'>(" . $aventurier->SEXE . ")</span>";
        ?>
</td></tr>
    <tr><td style='border-bottom:1px #900000 solid;text-align:center;'>Niveau <?php 
        echo $aventurier->NIVEAU;
        ?>
</td></tr>
        <tr>
            <td style='border-bottom:1px #900000 solid;text-align:center;'>
                <?php 
        echo $aventurier->ORIGINE->NOM . " ";
        if ($aventurier->METIER->NOM == "Aucun") {
            echo "sans profession";
        } else {
            echo $aventurier->METIER->NOM;
        }
        ?>
                
                <?php 
        if ($aventurier->autre_metier == "") {
        } else {
            echo "/" . $aventurier->autre_metier;
        }
        ?>
            </td>
        </tr>
    <tr><td style='vertical-align:top;'>
        <table style='background-image:url("image/bg3.png");margin:auto;border-collapse:collapse;'>        
        <tr><td style='width:20%;'>COU</td><td style='width:20%;'>INT</td><td style='width:20%;'>CHA</td><td style='width:20%;'>AD</td><td style='width:20%;'>FO</td></tr>
        <tr>
            <td><?php 
        echo $aventurier->COU;
        ?>
</td>
            <td><?php 
        if ($aventurier->INT > 12) {
            echo "<u>";
        }
        echo $aventurier->INT;
        if ($aventurier->INT > 12) {
            echo "</u>";
        }
        ?>
</td>
            <td><?php 
        echo $aventurier->CHA;
        ?>
</td>
            <td><?php 
        if ($aventurier->AD > 12) {
            echo "<u>";
        }
        echo $aventurier->AD;
        if ($aventurier->AD > 12) {
            echo "</u>";
        }
        ?>
</td>
            <td><?php 
        if ($aventurier->FO > 12) {
            echo "<u>";
        }
        echo $aventurier->FO;
        if ($aventurier->FO > 12) {
            echo "</u>";
        }
        ?>
</td>
        </tr>
        <?php 
        $modificateur_COU = 0;
        $modificateur_INT = 0;
        $modificateur_CHA = 0;
        $modificateur_AD = 0;
        $modificateur_FO = 0;
        foreach ($aventurier->armes as $arme) {
            $modificateur_COU += $arme->COU;
            $modificateur_INT += $arme->INT;
            $modificateur_CHA += $arme->CHA;
            $modificateur_AD += $arme->AD;
            $modificateur_FO += $arme->FOR;
        }
        foreach ($aventurier->protections as $protection) {
            $modificateur_COU += $protection->COU;
            $modificateur_INT += $protection->INT;
            $modificateur_CHA += $protection->CHA;
            $modificateur_AD += $protection->AD;
            $modificateur_FO += $protection->FOR;
        }
        ?>
        
        <tr style='border-bottom:1px #900000 solid;'>
            <td <?php 
        if ($modificateur_COU != 0) {
            echo "style='color:green;'";
        }
        ?>
 ><?php 
        if ($modificateur_COU != 0) {
            echo $aventurier->COU + $modificateur_COU;
        } else {
            echo "&nbsp;";
        }
        ?>
</td>
    <td <?php 
        if ($modificateur_INT != 0) {
            echo "style='color:green;'";
        }
        ?>
><?php 
        if ($modificateur_INT != 0) {
            echo $aventurier->INT + $modificateur_INT;
        } else {
            echo "&nbsp;";
        }
        ?>
</td>
<td <?php 
        if ($modificateur_CHA != 0) {
            echo "style='color:green;'";
        }
        ?>
><?php 
        if ($modificateur_CHA != 0) {
            echo $aventurier->CHA + $modificateur_CHA;
        } else {
            echo "&nbsp;";
        }
        ?>
</td>
            <td <?php 
        if ($modificateur_AD != 0) {
            echo "style='color:green;'";
        }
        ?>
><?php 
        if ($modificateur_AD != 0) {
            echo $aventurier->AD + $modificateur_AD;
        } else {
            echo "&nbsp;";
        }
        ?>
</td>
            <td <?php 
        if ($modificateur_FO != 0) {
            echo "style='color:green;'";
        }
        ?>
><?php 
        if ($modificateur_FO != 0) {
            echo $aventurier->FO + $modificateur_FO;
        } else {
            echo "&nbsp;";
        }
        ?>
</td>
        </tr>
        <tr style='border-bottom:1px #900000 solid;'><td colspan='2'>DESTIN :</td><td colspan='3'> <?php 
        echo $aventurier->DESTIN;
        ?>
 </td></tr>
        <tr style='border-bottom:1px #900000 solid;'><td> XP :</td><td colspan='4'> <?php 
        echo $aventurier->XP;
        ?>
 </td></tr>
        <tr style='border-bottom:1px #900000 solid;'><td> EV :</td><td colspan='4'> <?php 
        echo $aventurier->EV;
        ?>
 </td></tr>
        <?php 
        if ($aventurier->EA != 0) {
            ?>
                    <tr style='border-bottom:1px #900000 solid;'><td>EA :</td><td colspan='4'> <?php 
            echo $aventurier->EA;
            ?>
 </td></tr>
                <?php 
        }
        ?>
        <tr><td >AT</td><td>PRD</td><td style='font-size:80%;'>PRM</td><td>PR</td><td>RM</td></tr>
        <tr style='border-bottom:1px #900000 solid;'>
            <td><?php 
        echo $aventurier->AT;
        ?>
</td><td> <?php 
        echo $aventurier->PRD;
        ?>
 </td>
            <td> <?php 
        if ($aventurier->PR_MAX == 0) {
            echo " / ";
        } else {
            echo $aventurier->PR_MAX;
        }
        ?>
 </td>
            <td> <?php 
        echo $aventurier->PR;
        if ($aventurier->possedeCompetence(new Competence(49))) {
            echo "<span style='color:green;'>+1</span>";
        }
        ?>
</td><td><?php 
        echo $aventurier->RESISTMAG;
        ?>
</td>
        </tr>
        
        <?php 
        if ($aventurier->EA != 0) {
            ?>
                    <tr><td colspan='2'>MAGPSY</td><td colspan='3'>MAGPHYS</td></tr>
                    <tr style='border-bottom:1px #900000 solid;'><td colspan='2'><?php 
            echo $aventurier->MAGIEPSY;
            ?>
</td><td colspan='3'><?php 
            echo $aventurier->MAGIEPHYS;
            ?>
</td></tr>
                <?php 
        }
        echo "<tr style='font-size:70%;text-align:center;'><td colspan='5'><u>armes</u></td></tr>";
        echo "<tr style='font-size:80%;'><td>AT</td><td>PRD</td><td>MODIF</td><td>PI</td><td>RUP</td></tr>";
        $bonus_pi = "";
        if ($this->FO > 12) {
            $bonus_pi = "+" . ($this->FO - 12);
        } else {
            if ($this->FO < 9) {
                $bonus_pi = "-1";
            }
        }
        foreach ($aventurier->armes as $arme) {
            echo "<tr style='font-size:80%;'><td colspan='5'><u>" . $arme->NOM . "</u></td></tr>";
            $at = $aventurier->AT + $arme->AT;
            $prd = $aventurier->PRD + $arme->PRD;
            echo "<tr style='font-size:80%;border-bottom:1px #900000 dotted;'><td>" . $at . "</td><td>" . $prd . "</td><td>" . $arme->modifCharac() . "</td><td>" . $arme->PI . "<span style='color:green;'>" . $bonus_pi . "</span></td><td>" . $arme->RUP . "</td></tr>";
        }
        echo "<tr style='font-size:70%;text-align:center;border-top:1px #900000 solid;'><td colspan='5'><u>protection</u></td></tr>";
        echo "<tr style='font-size:80%;'><td colspan='3'>MODIF</td><td>PR</td><td>RUP</td></tr>";
        foreach ($aventurier->protections as $protection) {
            echo "<tr style='font-size:80%;'><td colspan='5'><u>" . $protection->NOM . "</u></td></tr>";
            echo "<tr style='font-size:80%;border-bottom:1px #900000 dotted;'><td colspan='3'>" . $protection->modif() . "</td><td>" . $protection->PR . "</td><td>" . $protection->RUP . "</td></tr>";
        }
        echo "<tr style='font-size:70%;text-align:center;padding:0px;border-top:1px #900000 solid;'><td colspan='5'><u>equipement</u></td></tr>";
        $compte = 0;
        foreach ($aventurier->equipements as $equipement) {
            if ($equipement->type == "munition") {
                echo "<tr style='font-size:80%;'><td colspan='5' style='padding:0px;'>" . $equipement->libelle . "</td></tr>";
                $compte++;
            }
        }
        $compte1 = 0;
        foreach ($aventurier->equipements as $equipement) {
            if ($equipement->type == "nourriture") {
                echo "<tr style='font-size:80%;";
                if ($compte > 0 && $compte1 == 0) {
                    echo "border-top:1px #900000 dotted;";
                }
                echo "'><td colspan='5' style='padding:0px;'>" . $equipement->libelle . "</td></tr>";
                $compte1++;
            }
        }
        $compte11 = 0;
        foreach ($aventurier->equipements as $equipement) {
            if ($equipement->type == "vetement") {
                echo "<tr style='font-size:80%;";
                if (($compte1 > 0 || $compte > 0) && $compte11 == 0) {
                    echo "border-top:1px #900000 dotted;";
                }
                echo "'><td colspan='5' style='padding:0px;'>" . $equipement->libelle . "</td></tr>";
                $compte11++;
            }
        }
        $compte2 = 0;
        foreach ($aventurier->equipements as $equipement) {
            if ($equipement->type != "nourriture" && $equipement->type != "munition" && $equipement->type != "vetement") {
                echo "<tr style='font-size:80%;";
                if (($compte1 > 0 || $compte11 > 0 || $compte > 0) && $compte2 == 0) {
                    echo "border-top:1px #900000 dotted;";
                }
                echo "'><td colspan='5' style='padding:0px;'>" . $equipement->libelle . "</td></tr>";
                $compte2++;
            }
        }
        ?>
        
        <tr style='border-top:1px #900000 solid;border-bottom:1px #900000 dotted;'><td style='padding:0px;'> OR :</td><td style='padding:0px;' colspan='4'> <?php 
        echo $aventurier->OR;
        ?>
 </td></tr>
        <tr style='border-bottom:1px #900000 dotted;'><td style='padding:0px;'> PA :</td><td colspan='4' style='padding:0px;'> <?php 
        echo $aventurier->ARGENT;
        ?>
 </td></tr>
        <tr style='border-bottom:1px #900000 solid;'><td style='padding:0px;'> PC :</td><td style='padding:0px;' colspan='4'> <?php 
        echo $aventurier->CUIVRE;
        ?>
 </td></tr>
        <tr>
            <td colspan='5' style='font-size:70%;'>
            <?php 
        $competences = Competence::Lister();
        foreach ($competences as $competence) {
            if ($aventurier->possedeCompetence($competence)) {
                if ($aventurier->estCompetenceChoisie($competence)) {
                    echo "<b>" . $competence->NOM . "</b><br />";
                } else {
                    echo "" . $competence->NOM . "<br />";
                }
            }
        }
        ?>
            </td>
        </tr>
       
        </table>      
       
    </td>
    </tr>
    </table>
        <?php 
    }
Example #5
0
<?php

$consultant_id = $_GET['con_id'];
//echo $consultant_id;
$competence = new Competence();
$competenceList = $competence->listOfConsultantCompetence($consultant_id);
$project = new Project();
$projectList = $project->ProjectsByConsultant($consultant_id);
$consultant = new Consultant();
$consultantList = $consultant->single_consultant($consultant_id);
?>

<div class="container">
	<div class="row">
		<div class="col-md-12 col-xs-12">
			<div class="well panel panel-default">
				<div class="panel-body">
					<div class="row">
						<div class="col-xs-12 col-sm-4 text-center">
						<img src="img/Hashim.jpg" alt="" class="center-block img-circle img-thumbnail img-responsive">
					</div>
					
					to upload foto ????
					<!--/col--> 
					<div class="col-xs-12 col-sm-8">
						<h2><?php 
echo $_GET['consultant_name'];
?>
</h2>
						<p><strong>Qualification: </strong><?php 
echo $consultantList->qualification;
Example #6
0
<?php 
$competence = new Competence();
$cur = $competence->single_competence($_GET['id']);
?>
<form class="form-horizontal well span9" action="controller.php?action=edit&id=<?php 
echo $cur->competence_id;
?>
" method="POST">
	
	<fieldset>
		<legend>Edit competence</legend>
		
		
		<div class="form-group" id="competence_id">
			<div class="col-md-8">
				<label class="col-md-4 control-label" for="competence_id">Competence Number *</label>
				
				<div class="col-md-8">
					<input class="form-control input-sm" id="competenceId" name="competenceId" placeholder="competence Number" type="text" value="<?php 
echo $cur->competence_id;
?>
" readonly>
				</div>
				
			</div>
			
		</div>
		
		<div class="form-group">
			<div class="rows">
Example #7
0
//echo 'password =   '******'<tr>';
        echo '<td width="5%" align="center"></td>';
        echo '<td width="15%"><input type="checkbox" name="selector[]" id="selector[]" value="' . $list->competence_id . '"/>';
        echo '<td width="55%" >' . $list->name . '</td>';
        echo '<td width="15%" ><a href = "index.php?view=edit&id=' . $list->competence_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  Edit</a></td>';
        echo '<td><a href = "index.php?view=view&competenceId=' . $list->competence_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  View</a></td>';
        echo '</tr>';
    }
    //}
} else {
    $competence = new Competence();
    $competenceList = $competence->listOfCompetence($competence_id);
    foreach ($competenceList as $list) {
        echo '<tr>';
        echo '</tr>';
    }
}
?>


				  </tbody>
				 
				</table>
				
		<div class="form-group">
			<div class="col-md-8">
Example #8
0
function getCompetencesAChoisirPourHumainSansProfession()
{
    $competences = Competence::Lister();
    $final = array();
    foreach ($competences as $competence) {
        if ($competence->NOM != "APPEL DU SAUVAGE (INT)") {
            $final[] = $competence;
        }
    }
    return $final;
}
Example #9
0
				  		<th width="15%" align="left"><input type="checkbox" name="chkall" id="chkall" onclick="return checkall('selector[]');"> Competence #</th>
				  		<th>Competence Name</th>
						 <th>Edit </th>
				  		<th>Details</th>
				  	</tr>	
				  </thead>
				  <tbody>
				  	<?php 
$account_username = $_SESSION['ACCOUNT_USERNAME'];
//$account_password = $_SESSION['ACCOUNT_PASSWORD'];
$account_type = $_SESSION['ACCOUNT_TYPE'];
//echo 'username =   '******'account type =   '. $account_type;
//echo 'password =   '******'<tr>';
        echo '<td width="5%" align="center"></td>';
        echo '<td width="15%"><input type="checkbox" name="selector[]" id="selector[]" value="' . $list->competence_id . '"/>';
        echo '<td width="55%" >' . $list->name . '</td>';
        echo '<td width="15%" ><a href = "index.php?view=edit&id=' . $list->competence_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  Edit</a></td>';
        echo '<td><a href = "index.php?view=view&competenceId=' . $list->competence_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  View</a></td>';
        echo '</tr>';
    }
    //}
} else {
    $competence = new Competence();
    //$competenceList = $competence->listOfCompetence($competence_id);
    foreach ($competenceList as $list) {