오프 일 주말의 X 일/연결/관리의 날짜를 incremente 그냥 내가 그런 짓을 한 AcutalyPHP는 내가 간단하게 추가 할 노력하고있어
그래서 일부 날짜를 표시하기 위해 :
while($row = mysql_fetch_assoc($qry)):
echo $req="INSERT INTO `agenda` SET
`code_s`= '".$row['code_s']."',
`titre` ='".$row['titre']."',
`action` ='".$row['action']."',
`libelle`='".$row['libelle']."',
`date_action`='".date('Y-m-d',strtotime('+"'.$row['jour'].'" days'))."',
`qualite`='".$da['qualite']."',
`n_doss`='".mysql_real_escape_string($_GET['n_doss'])."',
`code_client`='".$creance['code_client']."'<br>";
endwhile; };
AMM은 실수 표시되지 않습니다 다음 줄에 있습니다
`date_action`='".date('Y-m-d',strtotime('+"'.$row['jour'].'" days'))."',
내가하려고했던 것은 일 공동의 수의 증가 날짜를 표시하는 것입니다 var $ row [ 'jour']에서 ntained하지만 Actualy는 1970-01-01에 표시하므로 모든 var에 해당 var에 양수가 있기 때문에 이해할 수 없습니다. 또한
나는 일이 자바 스크립트 함수 : 그런
: Actualy 일이 일요일 또는 satturday 경우,이 기능은 날짜를 incremente
<script type="text/javascript">
function getdate2() {
var items = new Array();
var itemCount = document.getElementsByClassName("datepicker hasDatepicker");
for (var i = 0; i < itemCount.length; i++) {
items[i] = document.getElementById("date" + (i + 1)).value;
}
for (var i = 0; i < itemCount.length; i++) {
items[i] = document.getElementById("date" + (i + 1)).value;
var itemDtParts = items[i].split("-");
var itemDt = new Date(itemDtParts[2], itemDtParts[1] - 1, itemDtParts[0]);
<?php $sql="SELECT * FROM `societe` WHERE `id`=1"; $result=mysql_query($sql) or die; $data=mysql_fetch_assoc($result);?><?php if($data['samedi']==0) {?>
if (itemDt.getDay() == 6) {
itemCount[i].value = (itemDt.getDate() < 9 ? "0" : "")+ (itemDt.getDate()+2)+ "-" + (itemDt.getMonth() < 9 ? "0" : "") + (itemDt.getMonth() + 1) + "-" + itemDt.getFullYear();
}
<?php } ?>
if (itemDt.getDay() == 0) {
itemCount[i].value = (itemDt.getDate() < 9 ? "0" : "")+ (itemDt.getDate()+1)+ "-" + (itemDt.getMonth() < 9 ? "0" : "") + (itemDt.getMonth() + 1) + "-" + itemDt.getFullYear();
}
}
return items;
}
</script>
, 그것은 depens
이있는에서 매개 변수 설정입니다 이 줄의 데이터베이스는 다음과 같습니다.<?php $sql="SELECT * FROM `societe` WHERE `id`=1"; $result=mysql_query($sql) or die; $data=mysql_fetch_assoc($result);?><?php if($data['samedi']==0) {?>
if (itemDt.getDay() == 6) {
itemCount[i].value = (itemDt.getDate() < 9 ? "0" : "")+ (itemDt.getDate()+2)+ "-" + (itemDt.getMonth() < 9 ? "0" : "") + (itemDt.getMonth() + 1) + "-" + itemDt.getFullYear();
} ?>
때때로 일부 회사는 토요일에 작업하기 때문에.
데이터베이스에 삽입되기 전에이 함수를 새 날짜에 적용하는 방법을 알고 싶습니다.
PHP에서 none-object 항목에 javascript 기능을 적용 할 수있는 방법이 있습니까?
나는 존경받는 모든 사람들을 존중합니다.
친절하게 제공합니다.
SP.
) 구문 분석 오류 : 구문 오류, 예기치 못한 T_ENCAPSED_AND_WHITESPACE, 기대 T_STRING 또는 T_VARIABLE 또는 T_NUM_STRING 내가 –
친애하는 각하, 나는 여전히 같은 오류가 있습니다 –
내 대답을 편집했습니다 –